Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: gclient_scm.py

Issue 548079: Use --force to reset a git repo before attempting to rebase during gclient sync/update (Closed)
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index 010c45d183709586cdd42e2eec31aa585e050ca0..65b56c29b2e82450217901c958381229061d3ed9 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698