Skip to content

Commit 0c164ae

Browse files
phillipwoodgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2be6b6f commit 0c164ae

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

t/t3404-rebase-interactive.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,19 @@ test_expect_success 'reword' '
839839
git show HEAD~2 | grep "C changed"
840840
'
841841

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+
842855
test_expect_success 'rebase -i can copy notes' '
843856
git config notes.rewrite.rebase true &&
844857
git config notes.rewriteRef "refs/notes/*" &&

0 commit comments

Comments
 (0)