mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
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>
This commit is contained in:
parent
b1168ffada
commit
19a83d8085
@ -893,11 +893,11 @@ class Project(object):
|
|||||||
raise GitError('%s reset --hard %s ' % (self.name, rev))
|
raise GitError('%s reset --hard %s ' % (self.name, rev))
|
||||||
|
|
||||||
def _Rebase(self, upstream, onto = None):
|
def _Rebase(self, upstream, onto = None):
|
||||||
cmd = ['rebase', '-i']
|
cmd = ['rebase']
|
||||||
if onto is not None:
|
if onto is not None:
|
||||||
cmd.extend(['--onto', onto])
|
cmd.extend(['--onto', onto])
|
||||||
cmd.append(upstream)
|
cmd.append(upstream)
|
||||||
if GitCommand(self, cmd, disable_editor=True).Wait() != 0:
|
if GitCommand(self, cmd).Wait() != 0:
|
||||||
raise GitError('%s rebase %s ' % (self.name, upstream))
|
raise GitError('%s rebase %s ' % (self.name, upstream))
|
||||||
|
|
||||||
def _FastForward(self, head):
|
def _FastForward(self, head):
|
||||||
|
Loading…
Reference in New Issue
Block a user