]> git.ipfire.org Git - thirdparty/git.git/commit
rebase -r: make 'merge -c' behave like reword
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Fri, 20 Aug 2021 15:40:35 +0000 (15:40 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Aug 2021 19:54:36 +0000 (12:54 -0700)
commit2be6b6f411136c6773a90d2cfdacf3cccb79d3e6
treea367481a78c0096b9cf51b5cb686659cbe70f088
parent5d213e46bb7b880238ff5ea3914e940a50ae9369
rebase -r: make 'merge -c' behave like reword

If the user runs git log while rewording a commit it is confusing if
sometimes we're amending the commit that's being reworded and at other
times we're creating a new commit depending on whether we could
fast-forward or not[1]. For this reason the reword command ensures
that there are no uncommitted changes when rewording. The reword
command also allows the user to edit the todo list while the rebase is
paused. As 'merge -c' also rewords commits make it behave like reword
and add a test.

[1] https://lore.kernel.org/git/xmqqlfvu4be3.fsf@gitster-ct.c.googlers.com/T/#m133009cb91cf0917bcf667300f061178be56680a

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
t/lib-rebase.sh
t/t3430-rebase-merges.sh