Commit 772efaf8 authored by agable@chromium.org's avatar agable@chromium.org

Use CheckCallAndFilterAndHeader for git commands.

This causes git commands to be completely silent (they don't even print
______ running 'git foo bar') if the git command itself is completely silent.
This mirrors the behavior of SVN commands. This is useful for commands like
'gclient diff', which should print no output at all if there is no diff.

R=szager@chromium.org, vadimsh@chromium.org

Review URL: https://codereview.chromium.org/218993009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@260758 0039d316-1c4b-4281-b951-d872f2087c98
parent 512d97d4
......@@ -962,10 +962,8 @@ class GitWrapper(SCMWrapper):
env.setdefault('SSH_ASKPASS', 'true')
else:
kwargs.setdefault('print_stdout', True)
stdout = kwargs.get('stdout', sys.stdout)
stdout.write('\n________ running \'git %s\' in \'%s\'\n' % (
' '.join(args), kwargs['cwd']))
return gclient_utils.CheckCallAndFilter(['git'] + args, **kwargs)
cmd = ['git'] + args
return gclient_utils.CheckCallAndFilterAndHeader(cmd, **kwargs)
class SVNWrapper(SCMWrapper):
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment