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>
This commit is contained in:
parent
fbab6065d4
commit
69b4a9cf21
2 changed files with 41 additions and 5 deletions
|
@ -832,10 +832,12 @@ class Project(object):
|
|||
|
||||
return 'DIRTY'
|
||||
|
||||
def PrintWorkTreeDiff(self, absolute_paths=False):
|
||||
def PrintWorkTreeDiff(self, absolute_paths=False, output_redir=None):
|
||||
"""Prints the status of the repository to stdout.
|
||||
"""
|
||||
out = DiffColoring(self.config)
|
||||
if output_redir:
|
||||
out.redirect(output_redir)
|
||||
cmd = ['diff']
|
||||
if out.is_on:
|
||||
cmd.append('--color')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue