summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2013-01-26 22:11:21 -0500
committerJunio C Hamano <gitster@pobox.com>2013-01-26 22:00:39 -0800
commitc7d34884ae1d37e910ce6813c9baeb06c0912228 (patch)
tree3e2660b7d01b2dea91754198d61d6fa07b54f72b /git-p4.py
parent9bf28855108d7121e7c439da07175ff4c4f33e42 (diff)
downloadgit-c7d34884ae1d37e910ce6813c9baeb06c0912228.tar.gz
git p4: avoid shell when invoking git rev-list
Invoke git rev-list directly, avoiding the shell, in P4Submit and P4Sync. The overhead of starting extra processes is significant in cygwin; this speeds things up on that platform. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/git-p4.py b/git-p4.py
index c43d0443fb..c8ae83d502 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -1606,7 +1606,7 @@ class P4Submit(Command, P4UserMap):
self.check()
commits = []
- for line in read_pipe_lines("git rev-list --no-merges %s..%s" % (self.origin, self.master)):
+ for line in read_pipe_lines(["git", "rev-list", "--no-merges", "%s..%s" % (self.origin, self.master)]):
commits.append(line.strip())
commits.reverse()
@@ -2644,7 +2644,8 @@ class P4Sync(Command, P4UserMap):
def searchParent(self, parent, branch, target):
parentFound = False
- for blob in read_pipe_lines(["git", "rev-list", "--reverse", "--no-merges", parent]):
+ for blob in read_pipe_lines(["git", "rev-list", "--reverse",
+ "--no-merges", parent]):
blob = blob.strip()
if len(read_pipe(["git", "diff-tree", blob, target])) == 0:
parentFound = True