summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2021-02-16 18:18:01 -0500
committerMike Frysinger <vapier@google.com>2021-02-23 00:31:27 +0000
commit69b4a9cf216f4ffcb69ea2c39ebd6a01b2d0fec9 (patch)
treeb2049f041435fc487a9d1195c602150d3e712678 /project.py
parentfbab6065d44072d33b2fbe61f604f24397ea2de4 (diff)
downloadgit-repo-69b4a9cf216f4ffcb69ea2c39ebd6a01b2d0fec9.tar.gz
diff: add --jobs support
Use multiprocessing to run diff in parallel. Change-Id: I61e973d9c2cde039d5eebe8d0fe8bb63171ef447 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/297483 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: Chris Mcdonald <cjmcdonald@google.com>
Diffstat (limited to 'project.py')
-rw-r--r--project.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/project.py b/project.py
index 52a77f1e..da67c363 100644
--- a/project.py
+++ b/project.py
@@ -832,10 +832,12 @@ class Project(object):
832 832
833 return 'DIRTY' 833 return 'DIRTY'
834 834
835 def PrintWorkTreeDiff(self, absolute_paths=False): 835 def PrintWorkTreeDiff(self, absolute_paths=False, output_redir=None):
836 """Prints the status of the repository to stdout. 836 """Prints the status of the repository to stdout.
837 """ 837 """
838 out = DiffColoring(self.config) 838 out = DiffColoring(self.config)
839 if output_redir:
840 out.redirect(output_redir)
839 cmd = ['diff'] 841 cmd = ['diff']
840 if out.is_on: 842 if out.is_on:
841 cmd.append('--color') 843 cmd.append('--color')