rebase -i: add another reword test

None of the existing reword tests check that there are no uncommitted changes when the editor is opened. Reuse the editor script from the last commit to fix this omission. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Phillip Wood committed Aug 20, 2021 at 15:40 UTC 0c164ae7a65f811ef3fb3188c63cd157335463bb
1 file changed +13
t/t3404-rebase-interactive.sh
+13
@@ -839,6 +839,19 @@ test_expect_success 'reword' '
839 git show HEAD~2 | grep "C changed"
840 '
841
842 +test_expect_success 'no uncommited changes when rewording the todo list is reloaded' '
843 + git checkout E &&
844 + test_when_finished "git checkout @{-1}" &&
845 + (
846 + set_fake_editor &&
847 + GIT_SEQUENCE_EDITOR="\"$PWD/fake-editor.sh\"" &&
848 + export GIT_SEQUENCE_EDITOR &&
849 + set_reword_editor &&
850 + FAKE_LINES="reword 1 reword 2" git rebase -i C
851 + ) &&
852 + check_reworded_commits D E
853 +'
854 +
855 test_expect_success 'rebase -i can copy notes' '
856 git config notes.rewrite.rebase true &&
857 git config notes.rewriteRef "refs/notes/*" &&