Skip to content

Commit ddb5432

Browse files
moygitster
authored andcommitted
rebase -i: test "Nothing to do" case with autostash
Signed-off-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e4244eb commit ddb5432

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

t/t3420-rebase-autostash.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,19 @@ testrebase "" .git/rebase-apply
167167
testrebase " --merge" .git/rebase-merge
168168
testrebase " --interactive" .git/rebase-merge
169169

170+
test_expect_success 'abort rebase -i with --autostash' '
171+
test_when_finished "git reset --hard" &&
172+
echo uncommited-content >file0 &&
173+
(
174+
write_script abort-editor.sh <<-\EOF &&
175+
echo >"$1"
176+
EOF
177+
test_set_editor "$(pwd)/abort-editor.sh" &&
178+
test_must_fail git rebase -i --autostash HEAD^ &&
179+
rm -f abort-editor.sh
180+
) &&
181+
echo uncommited-content >expected &&
182+
test_cmp expected file0
183+
'
184+
170185
test_done

0 commit comments

Comments
 (0)