summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-04-29 23:15:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-04-29 23:15:27 (GMT)
commit3afdeef33e1d7912b8b135df2ea3fef3a3cf60bc (patch)
tree9fd86e666b7c013395c535607130a3027aa3f54a /t
parentbf10200871d9e7e1fc9f54aca9b2fe40bc4e4ac7 (diff)
parent9b2df3e8d093145f1628af82b94f6dcfc85b9646 (diff)
downloadgit-3afdeef33e1d7912b8b135df2ea3fef3a3cf60bc.zip
git-3afdeef33e1d7912b8b135df2ea3fef3a3cf60bc.tar.gz
git-3afdeef33e1d7912b8b135df2ea3fef3a3cf60bc.tar.bz2
Merge branch 'dl/merge-autostash-rebase-quit-fix'
The stash entry created by "git rebase --autosquash" to keep the initial dirty state were discarded by mistake upon "git rebase --quit", which has been corrected. * dl/merge-autostash-rebase-quit-fix: rebase: save autostash entry into stash reflog on --quit
Diffstat (limited to 't')
-rwxr-xr-xt/t3420-rebase-autostash.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh
index b97ea62..ca33173 100755
--- a/t/t3420-rebase-autostash.sh
+++ b/t/t3420-rebase-autostash.sh
@@ -184,6 +184,26 @@ testrebase () {
git checkout feature-branch
'
+ test_expect_success "rebase$type: --quit" '
+ test_config rebase.autostash true &&
+ git reset --hard &&
+ git checkout -b rebased-feature-branch feature-branch &&
+ test_when_finished git branch -D rebased-feature-branch &&
+ echo dirty >>file3 &&
+ git diff >expect &&
+ test_must_fail git rebase$type related-onto-branch &&
+ test_path_is_file $dotest/autostash &&
+ test_path_is_missing file3 &&
+ git rebase --quit &&
+ test_when_finished git stash drop &&
+ test_path_is_missing $dotest/autostash &&
+ ! grep dirty file3 &&
+ git stash show -p >actual &&
+ test_cmp expect actual &&
+ git reset --hard &&
+ git checkout feature-branch
+ '
+
test_expect_success "rebase$type: non-conflicting rebase, conflicting stash" '
test_config rebase.autostash true &&
git reset --hard &&