diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2023-02-23 21:55:01 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-23 23:25:50 +0100 |
commit | 666b6e1135c12925efe608c4d5f03234c54e2d0c (patch) | |
tree | 898b573a823dad86399b06839fd2d67d6e3c1ca5 /t/test-lib-functions.sh | |
parent | rebase -i: match whole word in is_command() (diff) | |
download | git-666b6e1135c12925efe608c4d5f03234c54e2d0c.tar.xz git-666b6e1135c12925efe608c4d5f03234c54e2d0c.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | t/test-lib-functions.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 796093a7b3..c249fc8aba 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -32,6 +32,14 @@ test_set_editor () { export EDITOR } +# Like test_set_editor but sets GIT_SEQUENCE_EDITOR instead of EDITOR +test_set_sequence_editor () { + FAKE_SEQUENCE_EDITOR="$1" + export FAKE_SEQUENCE_EDITOR + GIT_SEQUENCE_EDITOR='"$FAKE_SEQUENCE_EDITOR"' + export GIT_SEQUENCE_EDITOR +} + test_decode_color () { awk ' function name(n) { |