Thread (28 messages) flat view 28 messages, 3 authors, 2016-06-15
STALE3743d

[PATCH 18/21] git p4: avoid shell when invoking git rev-list

From: Pete Wyckoff <hidden>
Date: 2016-06-15 22:54:53
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 git-p4.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/git-p4.py b/git-p4.py
index a92d84f..9c33af4 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -1538,7 +1538,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()
 
@@ -2558,7 +2558,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
-- 
1.7.12.1.403.g28165e1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help