summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-06-25 18:49:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-06-25 18:49:31 (GMT)
commitd9036cd28c9b115fe38e2f629292f2ddf60fb805 (patch)
tree3bfea3d65784d1719a86e5d86814ff6a9d81dc9a /t
parent8675779454ed3007bd2a8f83d013e05a65c2d480 (diff)
parentddb5432d2390e1957e473618009ba3d2fbbf29a7 (diff)
downloadgit-d9036cd28c9b115fe38e2f629292f2ddf60fb805.zip
git-d9036cd28c9b115fe38e2f629292f2ddf60fb805.tar.gz
git-d9036cd28c9b115fe38e2f629292f2ddf60fb805.tar.bz2
Merge branch 'rr/rebase-autostash-fix' into maint
The autostash mode of "git rebase -i" did not restore the dirty working tree state if the user aborted the interactive rebase by emptying the insn sheet. * rr/rebase-autostash-fix: rebase -i: test "Nothing to do" case with autostash rebase -i: handle "Nothing to do" case with autostash
Diffstat (limited to 't')
-rwxr-xr-xt/t3420-rebase-autostash.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh
index 90eb264..d783f03 100755
--- a/t/t3420-rebase-autostash.sh
+++ b/t/t3420-rebase-autostash.sh
@@ -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