From 9bf28855108d7121e7c439da07175ff4c4f33e42 Mon Sep 17 00:00:00 2001 From: Pete Wyckoff Date: Sat, 26 Jan 2013 22:11:20 -0500 Subject: [PATCH] git p4: avoid shell when mapping users The extra quoting and double-% are unneeded, just to work around the shell. Instead, avoid the shell indirection. Signed-off-by: Pete Wyckoff Signed-off-by: Junio C Hamano --- git-p4.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git-p4.py b/git-p4.py index a98970483b..c43d0443fb 100755 --- a/git-p4.py +++ b/git-p4.py @@ -1050,7 +1050,8 @@ def patchRCSKeywords(self, file, pattern): def p4UserForCommit(self,id): # Return the tuple (perforce user,git email) for a given git commit id self.getUserMapFromPerforceServer() - gitEmail = read_pipe("git log --max-count=1 --format='%%ae' %s" % id) + gitEmail = read_pipe(["git", "log", "--max-count=1", + "--format=%ae", id]) gitEmail = gitEmail.strip() if not self.emails.has_key(gitEmail): return (None,gitEmail)