diff --git a/fetch.py b/fetch.py index 67d219f698..d911c0668c 100755 --- a/fetch.py +++ b/fetch.py @@ -144,9 +144,10 @@ class GclientGitCheckout(GclientCheckout, GitCheckout): 'submodule', 'foreach', 'git config -f $toplevel/.git/config submodule.$name.ignore all', cwd=wd) - self.run_git( - 'config', '--add', 'remote.origin.fetch', - '+refs/tags/*:refs/tags/*', cwd=wd) + if not self.options.no_history: + self.run_git( + 'config', '--add', 'remote.origin.fetch', + '+refs/tags/*:refs/tags/*', cwd=wd) self.run_git('config', 'diff.ignoreSubmodules', 'all', cwd=wd)