Commit eafef3b3 authored by msb@chromium.org's avatar msb@chromium.org

Use --force to reset a git repo before attempting to rebase during gclient sync/update

Patch Contributed By: Nasser Grainawi <nasser@codeaurora.org>

Review URL: http://codereview.chromium.org/548079

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37020 0039d316-1c4b-4281-b951-d872f2087c98
parent 3904caa9
......@@ -213,6 +213,8 @@ class GitWrapper(SCMWrapper, scm.GIT):
self._Run(['remote', 'update'], redirect_stdout=False)
files = self._Run(['diff', new_base, '--name-only']).split()
file_list.extend([os.path.join(self.checkout_path, f) for f in files])
if options.force:
self._Run(['reset', '--hard', merge_base], redirect_stdout=False)
self._Run(['rebase', '-v', '--onto', new_base, merge_base, cur_branch],
redirect_stdout=False, checkrc=False)
......
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