mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
gclient: Reset the fetch config also when --force is passed.
The update_scripts step doesn't set '--reset' Additionally, if there was no fetch config, don't fail trying to unset it. Tbr: agable@chromium.org No-Try: True Bug: 862547 Change-Id: I90886ca7d1dd20ae59b378a5998de47dc67c60f9 Reviewed-on: https://chromium-review.googlesource.com/1137693 Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
This commit is contained in:
@@ -316,7 +316,13 @@ class Mirror(object):
|
||||
cwd = self.mirror_path
|
||||
|
||||
if reset_fetch_config:
|
||||
self.RunGit(['config', '--unset-all', 'remote.origin.fetch'], cwd=cwd)
|
||||
try:
|
||||
self.RunGit(['config', '--unset-all', 'remote.origin.fetch'], cwd=cwd)
|
||||
except subprocess.CalledProcessError as e:
|
||||
# If exit code was 5, it means we attempted to unset a config that
|
||||
# didn't exist. Ignore it.
|
||||
if e.returncode != 5:
|
||||
raise
|
||||
|
||||
# Don't run git-gc in a daemon. Bad things can happen if it gets killed.
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user