]> git.99rst.org Git - git.git/commit
rebase: remember fixup -c after skipping fixup/squash
authorPhillip Wood <redacted>
Sun, 26 Jul 2026 15:39:00 +0000 (16:39 +0100)
committerJunio C Hamano <redacted>
Sun, 26 Jul 2026 21:02:01 +0000 (14:02 -0700)
commit4a3a8ee96c7c749b99c91345db190a2c3720abeb
tree1c4ea1660ea9ea54c69acb160a03d1aec6b872c0
parent2f5ff2c339d90422dd4010b5d980d33d1959fdd9
rebase: remember fixup -c after skipping fixup/squash

When the final command in a chain of "fixup" and "squash" commands
is skipped, we should prompt the user to edit the commit message
if the chain contains a "fixup -c" command that was not skipped.
Unfortunately, commit_staged_changes() only looks for completed "squash"
commands and so does not prompt the user to edit the message. Fix
this by recording whether a fixup command has the "-c" flag set and
then checking whether we have seen either a "fixup -c" or a "squash"
command. Add regression tests for skipping a command in the middle
of the chain (which currently works but has no test coverage), and
for skipping the final command (which is fixed by this patch).

Signed-off-by: Phillip Wood <redacted>
Signed-off-by: Junio C Hamano <redacted>
sequencer.c
t/t3437-rebase-fixup-options.sh
git clone https://git.99rst.org/PROJECT