]> git.ipfire.org Git - thirdparty/git.git/commitdiff
rebase -i: test "Nothing to do" case with autostash
authorMatthieu Moy <Matthieu.Moy@imag.fr>
Tue, 20 May 2014 07:49:31 +0000 (09:49 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 May 2014 18:33:49 +0000 (11:33 -0700)
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3420-rebase-autostash.sh

index 90eb26493cd309da34687dffc939166069cd88c6..d783f03d3fc581eed08d8d2593e20ced3cbae200 100755 (executable)
@@ -167,4 +167,19 @@ testrebase "" .git/rebase-apply
 testrebase " --merge" .git/rebase-merge
 testrebase " --interactive" .git/rebase-merge
 
+test_expect_success 'abort rebase -i with --autostash' '
+       test_when_finished "git reset --hard" &&
+       echo uncommited-content >file0 &&
+       (
+               write_script abort-editor.sh <<-\EOF &&
+                       echo >"$1"
+               EOF
+               test_set_editor "$(pwd)/abort-editor.sh" &&
+               test_must_fail git rebase -i --autostash HEAD^ &&
+               rm -f abort-editor.sh
+       ) &&
+       echo uncommited-content >expected &&
+       test_cmp expected file0
+'
+
 test_done