Commit 8dd35461 authored by szager@chromium.org's avatar szager@chromium.org

Update .git/objects/info/alternates when upstream url changes.

BUG=497943
R=hinoka@chromium.org,agable@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295568 0039d316-1c4b-4281-b951-d872f2087c98
parent 4c61dccd
......@@ -452,6 +452,11 @@ class GitWrapper(SCMWrapper):
self._CheckClean(rev_str)
# Switch over to the new upstream
self._Run(['remote', 'set-url', self.remote, url], options)
if mirror:
with open(os.path.join(
self.checkout_path, '.git', 'objects', 'info', 'alternates'),
'w') as fh:
fh.write(os.path.join(url, 'objects'))
self._FetchAndReset(revision, file_list, options)
return_early = True
......
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