diff options
author | Shawn O. Pearce <sop@google.com> | 2008-10-30 11:03:00 -0700 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2008-10-30 11:03:00 -0700 |
commit | a54c527ae941a3bbf8b3ec54249ab12c3d6bf78b (patch) | |
tree | ed70807cabe8bd010277cd0a1d976a3d726f5f70 /project.py | |
parent | df830f12389984adeeba04659615b9fc230f2db3 (diff) | |
download | git-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>
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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: |