| Index: gclient_scm.py
|
| diff --git a/gclient_scm.py b/gclient_scm.py
|
| index acebb099637dd0b486079f766657a98feecc294d..0dabd265e4fbfb1b388156dff71cca2914444a3e 100644
|
| --- a/gclient_scm.py
|
| +++ b/gclient_scm.py
|
| @@ -426,8 +426,9 @@ class GitWrapper(SCMWrapper):
|
| ['git', 'config', 'remote.%s.gclient-auto-fix-url' % self.remote],
|
| cwd=self.checkout_path).strip() != 'False'):
|
| self.Print('_____ switching %s to a new upstream' % self.relpath)
|
| - # Make sure it's clean
|
| - self._CheckClean(rev_str)
|
| + if not (options.force or options.reset):
|
| + # Make sure it's clean
|
| + self._CheckClean(rev_str)
|
| # Switch over to the new upstream
|
| self._Run(['remote', 'set-url', self.remote, url], options)
|
| self._FetchAndReset(revision, file_list, options)
|
|
|