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>
Pete Wyckoff committed
Jan 26, 2013 at 22:11 UTC
9bf28855108d7121e7c439da07175ff4c4f33e42
1 file changed
+2
-1
git-p4.py
+2
-1
@@ -1050,7 +1050,8 @@ class P4Submit(Command, P4UserMap):
1050
def p4UserForCommit(self,id):
1051
# Return the tuple (perforce user,git email) for a given git commit id
1052
self.getUserMapFromPerforceServer()
1053
- gitEmail = read_pipe("git log --max-count=1 --format='%%ae' %s" % id)
1053
+ gitEmail = read_pipe(["git", "log", "--max-count=1",
1054
+ "--format=%ae", id])
1055
gitEmail = gitEmail.strip()
1056
if not self.emails.has_key(gitEmail):
1057
return (None,gitEmail)