]> git.ipfire.org Git - thirdparty/git.git/commit - sequencer.c
sequencer: handle post-rewrite for merge commands
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 25 Apr 2018 12:29:29 +0000 (14:29 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 Apr 2018 03:28:43 +0000 (12:28 +0900)
commit537e7d61359233e95d2ca6ef6b9059afca8daa81
tree79414a94828c3d321ddd2bd6b2d19ef7d0e242e1
parenta9be29c9817067128a2818a609450db6e6722ffd
sequencer: handle post-rewrite for merge commands

In the previous patches, we implemented the basic functionality of the
`git rebase -i --rebase-merges` command, in particular the `merge`
command to create merge commits in the sequencer.

The interactive rebase is a lot more these days, though, than a simple
cherry-pick in a loop. For example, it calls the post-rewrite hook (if
any) after rebasing with a mapping of the old->new commits.

This patch implements the post-rewrite handling for the `merge` command
we just introduced. The other commands that were added recently (`label`
and `reset`) do not create new commits, therefore post-rewrite hooks do
not need to handle them.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
t/t3430-rebase-merges.sh