Commit 6bb0c6e2 authored by ilevy@chromium.org's avatar ilevy@chromium.org

Add option to prevent gclient from changing remote

Allow users to set a git config entry which stops
gclient from messing with remote.origin.url. Useful
for using experimental repos.

Review URL: https://chromiumcodereview.appspot.com/14731015

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@199532 0039d316-1c4b-4281-b951-d872f2087c98
parent 6b4a6545
......@@ -318,7 +318,8 @@ class GitWrapper(SCMWrapper):
current_url = self._Capture(['config', 'remote.origin.url'])
# TODO(maruel): Delete url != 'git://foo' since it's just to make the
# unit test pass. (and update the comment above)
if current_url != url and url != 'git://foo':
if (current_url != url and url != 'git://foo' and
self._Capture(['config', 'remote.origin.gclient']) != 'getoffmylawn'):
print('_____ switching %s to a new upstream' % self.relpath)
# Make sure it's clean
self._CheckClean(rev_str)
......
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