summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2008-10-30 11:03:00 -0700
committerShawn O. Pearce <sop@google.com>2008-10-30 11:03:00 -0700
commita54c527ae941a3bbf8b3ec54249ab12c3d6bf78b (patch)
treeed70807cabe8bd010277cd0a1d976a3d726f5f70
parentdf830f12389984adeeba04659615b9fc230f2db3 (diff)
downloadgit-repo-a54c527ae941a3bbf8b3ec54249ab12c3d6bf78b.tar.gz
Fast-forward a fully merged topic branch during 'repo sync'
Instead of trying to rebase the changes on a topic branch that has been fully merged into the upstream branch we track, we should just fast-forward the topic branch to the new upstream revision. This way the branch doesn't try to rewrite commits that are already merged in the upstream. Signed-off-by: Shawn O. Pearce <sop@google.com>
-rw-r--r--project.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/project.py b/project.py
index 120264f7..b8a347d9 100644
--- a/project.py
+++ b/project.py
@@ -563,6 +563,15 @@ class Project(object):
563 _info("[%s] Consider merging or rebasing the" 563 _info("[%s] Consider merging or rebasing the"
564 " unpublished commits.", self.name) 564 " unpublished commits.", self.name)
565 return True 565 return True
566 else:
567 # We can fast-forward safely.
568 #
569 try:
570 self._FastForward(rev)
571 except GitError:
572 return False
573 self._CopyFiles()
574 return True
566 575
567 if merge == rev: 576 if merge == rev:
568 try: 577 try: