Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git p4: avoid shell when mapping users
author
Pete Wyckoff
<pw@padd.com>
Sun, 27 Jan 2013 03:11:20 +0000
(22:11 -0500)
committer
Junio C Hamano
<gitster@pobox.com>
Sun, 27 Jan 2013 06:00:39 +0000
(22:00 -0800)
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>
git-p4.py
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (from parent 1:
d20f0f8
)
diff --git
a/git-p4.py
b/git-p4.py
index a98970483bfa65c84a02319b2bb7a1839ae0d3aa..c43d0443fbaa7908c1ec8ba46438e05d04654855 100755
(executable)
--- a/
git-p4.py
+++ b/
git-p4.py
@@
-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()
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)
gitEmail = gitEmail.strip()
if not self.emails.has_key(gitEmail):
return (None,gitEmail)