summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2013-01-26 22:11:20 -0500
committerJunio C Hamano <gitster@pobox.com>2013-01-26 22:00:39 -0800
commit9bf28855108d7121e7c439da07175ff4c4f33e42 (patch)
tree16a7ea3b1bc02a640ad23f240caf5cad102bc858
parentd20f0f8e2804bedc2c3743b523724ba7b8d34264 (diff)
downloadgit-9bf28855108d7121e7c439da07175ff4c4f33e42.tar.gz
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 <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-p4.py3
1 files changed, 2 insertions, 1 deletions
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 @@ class P4Submit(Command, P4UserMap):
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)