Browse Source

rebase -i: test "Nothing to do" case with autostash

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Matthieu Moy 11 years ago committed by Junio C Hamano
parent
commit
ddb5432d23
  1. 15
      t/t3420-rebase-autostash.sh

15
t/t3420-rebase-autostash.sh

@ -167,4 +167,19 @@ testrebase "" .git/rebase-apply @@ -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

Loading…
Cancel
Save