1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-04 00:46:12 +02:00

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>
This commit is contained in:
Pete Wyckoff 2013-01-26 22:11:20 -05:00 committed by Junio C Hamano
parent d20f0f8e28
commit 9bf2885510

View File

@ -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)