Skip to content

Commit 9bf2885

Browse files
Pete Wyckoffgitster
authored andcommitted
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>
1 parent d20f0f8 commit 9bf2885

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

git-p4.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,8 @@ def patchRCSKeywords(self, file, pattern):
10501050
def p4UserForCommit(self,id):
10511051
# Return the tuple (perforce user,git email) for a given git commit id
10521052
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])
10541055
gitEmail = gitEmail.strip()
10551056
if not self.emails.has_key(gitEmail):
10561057
return (None,gitEmail)

0 commit comments

Comments
 (0)