diff options
author | Shawn O. Pearce <sop@google.com> | 2009-04-16 08:14:26 -0700 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2009-04-16 08:23:29 -0700 |
commit | 19a83d80854d88f079f8d6530812b50948f0e28c (patch) | |
tree | 2ca943f3833963b4d34d1a675dc9f6ed2f1bd201 /project.py | |
parent | b1168ffadaff387a8b7ab9a9c861073035c505a8 (diff) | |
download | git-repo-19a83d80854d88f079f8d6530812b50948f0e28c.tar.gz |
Use default rebase during sync instead of rebase -i
rebase interactive (aka rebase -i) has changed in newer versions
of git, and doesn't always generate the sequence of commits the
same way it used to. It also doesn't handle having a previously
applied commit try to be applied again.
The default rebase algorithm is better suited to our needs.
It uses --ignore-if-in-upstream when generating the patch series
for git-am, and git-am with its 3-way fallback is able to handle
a rename case just as well as the cherry-pick variant used by -m.
Its also a generally faster implementation.
Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -893,11 +893,11 @@ class Project(object): | |||
893 | raise GitError('%s reset --hard %s ' % (self.name, rev)) | 893 | raise GitError('%s reset --hard %s ' % (self.name, rev)) |
894 | 894 | ||
895 | def _Rebase(self, upstream, onto = None): | 895 | def _Rebase(self, upstream, onto = None): |
896 | cmd = ['rebase', '-i'] | 896 | cmd = ['rebase'] |
897 | if onto is not None: | 897 | if onto is not None: |
898 | cmd.extend(['--onto', onto]) | 898 | cmd.extend(['--onto', onto]) |
899 | cmd.append(upstream) | 899 | cmd.append(upstream) |
900 | if GitCommand(self, cmd, disable_editor=True).Wait() != 0: | 900 | if GitCommand(self, cmd).Wait() != 0: |
901 | raise GitError('%s rebase %s ' % (self.name, upstream)) | 901 | raise GitError('%s rebase %s ' % (self.name, upstream)) |
902 | 902 | ||
903 | def _FastForward(self, head): | 903 | def _FastForward(self, head): |