rebase -p --first-parent: redo merge by cherry-picking first-parent change
commitec459c0e72ae0655516c8b4d525718cf03707740
authorJohannes Sixt <j6t@kdbg.org>
Sun, 16 Jun 2013 13:50:42 +0000 (16 15:50 +0200)
committerJohannes Sixt <j6t@kdbg.org>
Tue, 10 Nov 2015 08:25:05 +0000 (10 09:25 +0100)
tree74112391c4cdfacb93c78a6d73ebe8c07a95bc59
parentf34be46e47773d03e9d09641209121591a6b37c8
rebase -p --first-parent: redo merge by cherry-picking first-parent change

When rebase -p had to replay a merge commit, it repeats the merge. But
this has drawbacks:

- When the merge has conflicts, then the rebase stops to request user
  interaction. Conflict resolutions are only carried along as far as they
  have been picked up by the rerere machinery.

- When the merge is evil, i.e., contains changes that are in neither of
  the parents, these changes are not preserved.

- The 'git merge' invocation passes the commit message of the old merge
  commit, but it still obeys the merge.log option. If it is set, the log
  ends up twice in the commit message.

Add option --first-parent to redo the merge by picking the changes that
the merge introduces with respect to the first parent.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
git-rebase--interactive.sh
git-rebase.sh