]> git.ipfire.org Git - thirdparty/git.git/commit - sequencer.c
rebase -i: fix parsing of "fixup -C<commit>"
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Thu, 23 Feb 2023 20:55:01 +0000 (20:55 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Feb 2023 22:25:50 +0000 (14:25 -0800)
commit666b6e1135c12925efe608c4d5f03234c54e2d0c
tree898b573a823dad86399b06839fd2d67d6e3c1ca5
parent7aed2c0565bb1a7b4524f93e35a29770286ea630
rebase -i: fix parsing of "fixup -C<commit>"

If the user omits the space between "-C" and the commit in a fixup
command then it is parsed as an ordinary fixup and the commit message is
not updated as it should be. Fix this by making the space between "-C"
and "<commit>" optional as it is for the "merge" command.

Note that set_replace_editor() is changed to set $GIT_SEQUENCE_EDITOR
instead of $EDITOR in order to be able to replace the todo list and
reword commits with $FAKE_COMMIT_MESSAGE. This is safe as all the
existing users are using set_replace_editor() to replace the todo list.

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/t3437-rebase-fixup-options.sh
t/test-lib-functions.sh