From bd95f41abd4063a61d98825c0fd62199683b3bab Mon Sep 17 00:00:00 2001 From: Aaron Gable Date: Wed, 29 Nov 2017 11:20:26 -0800 Subject: [PATCH] Fix fetch --dry-run to not invoke git This was broken by 209a681f9cb0e955d5659216f262ef5b00861e8a, which replaced self.run() with git_common.run(), thus bypassing self.run()'s dry_run check. Bug: 788562 Change-Id: I9964c169b0ff56778c4660acab7ef7c010e37a36 Reviewed-on: https://chromium-review.googlesource.com/797611 Commit-Queue: Aaron Gable Reviewed-by: Andrii Shyshkalov --- fetch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fetch.py b/fetch.py index 60b1c1c6e..5944140c1 100755 --- a/fetch.py +++ b/fetch.py @@ -91,6 +91,8 @@ class GitCheckout(Checkout): def run_git(self, *cmd, **kwargs): print 'Running: git %s' % (' '.join(pipes.quote(x) for x in cmd)) + if self.options.dry_run: + return '' return git_common.run(*cmd, **kwargs)