mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-01-20 16:14:25 +00:00
start: do not swallow git output all the time
Normally git produces no output when creating or switching branches. If there's a problem though, we want to show that to the user. So switch from capturing all output to running in quiet mode. Bug: https://crbug.com/gerrit/15819 Change-Id: I7873ecc7c3bacce591899cc9471cb0244eb74541 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/343454 Reviewed-by: LaMont Jones <lamontjones@google.com> Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
parent
3c2d807905
commit
ad1b7bd2e2
10
project.py
10
project.py
@ -1678,10 +1678,7 @@ class Project(object):
|
||||
|
||||
all_refs = self.bare_ref.all
|
||||
if R_HEADS + name in all_refs:
|
||||
return GitCommand(self,
|
||||
['checkout', name, '--'],
|
||||
capture_stdout=True,
|
||||
capture_stderr=True).Wait() == 0
|
||||
return GitCommand(self, ['checkout', '-q', name, '--']).Wait() == 0
|
||||
|
||||
branch = self.GetBranch(name)
|
||||
branch.remote = self.GetRemote()
|
||||
@ -1706,10 +1703,7 @@ class Project(object):
|
||||
branch.Save()
|
||||
return True
|
||||
|
||||
if GitCommand(self,
|
||||
['checkout', '-b', branch.name, revid],
|
||||
capture_stdout=True,
|
||||
capture_stderr=True).Wait() == 0:
|
||||
if GitCommand(self, ['checkout', '-q', '-b', branch.name, revid]).Wait() == 0:
|
||||
branch.Save()
|
||||
return True
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user