summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2013-01-27 03:11:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-01-27 06:00:39 (GMT)
commit9bf28855108d7121e7c439da07175ff4c4f33e42 (patch)
tree16a7ea3b1bc02a640ad23f240caf5cad102bc858 /git-p4.py
parentd20f0f8e2804bedc2c3743b523724ba7b8d34264 (diff)
downloadgit-9bf28855108d7121e7c439da07175ff4c4f33e42.zip
git-9bf28855108d7121e7c439da07175ff4c4f33e42.tar.gz
git-9bf28855108d7121e7c439da07175ff4c4f33e42.tar.bz2
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>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-p4.py b/git-p4.py
index a989704..c43d044 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)