From ad1b7bd2e2d4fb636bef03d4b056b2f9de1fbf19 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 18 Aug 2022 09:17:09 -0400 Subject: [PATCH] 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 Tested-by: Mike Frysinger --- project.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/project.py b/project.py index 4bf1ecad..894fb38a 100644 --- a/project.py +++ b/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