Skip to content

Commit

Permalink
git p4: avoid shell when mapping users
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pete Wyckoff authored and Junio C Hamano committed Jan 27, 2013
1 parent d20f0f8 commit 9bf2885
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-p4.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9bf2885

Please sign in to comment.