Skip to content

Commit c7d3488

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

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

git-p4.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,7 @@ def run(self, args):
16061606
self.check()
16071607

16081608
commits = []
1609-
for line in read_pipe_lines("git rev-list --no-merges %s..%s" % (self.origin, self.master)):
1609+
for line in read_pipe_lines(["git", "rev-list", "--no-merges", "%s..%s" % (self.origin, self.master)]):
16101610
commits.append(line.strip())
16111611
commits.reverse()
16121612

@@ -2644,7 +2644,8 @@ def importNewBranch(self, branch, maxChange):
26442644

26452645
def searchParent(self, parent, branch, target):
26462646
parentFound = False
2647-
for blob in read_pipe_lines(["git", "rev-list", "--reverse", "--no-merges", parent]):
2647+
for blob in read_pipe_lines(["git", "rev-list", "--reverse",
2648+
"--no-merges", parent]):
26482649
blob = blob.strip()
26492650
if len(read_pipe(["git", "diff-tree", blob, target])) == 0:
26502651
parentFound = True

0 commit comments

Comments
 (0)