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 <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/fetch.py b/fetch.py
index 60b1c1c..5944140 100755
--- a/fetch.py
+++ b/fetch.py
@@ -91,6 +91,8 @@
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)