diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-09-13 12:21:11 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-09-13 12:21:11 -0700 |
| commit | 2c75b3255b1d1f525c7c61b540b99af1ad84e8f8 (patch) | |
| tree | 34494132932eb5d43799c67a4cd9e087b72df58a /t/t7600-merge.sh | |
| parent | 4f06dfde7aa55a444600c804559b44bf9bf764d2 (diff) | |
| parent | d3a9295ada961012bfe8582540e40a02e772aa09 (diff) | |
| download | git-2c75b3255b1d1f525c7c61b540b99af1ad84e8f8.tar.gz | |
Merge branch 'en/merge-unstash-only-on-clean-merge' into maint
The auto-stashed local changes created by "git merge --autostash"
was mixed into a conflicted state left in the working tree, which
has been corrected.
* en/merge-unstash-only-on-clean-merge:
merge: only apply autostash when appropriate
Diffstat (limited to 't/t7600-merge.sh')
| -rwxr-xr-x | t/t7600-merge.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh index f0f6fda150..7c3f6ed994 100755 --- a/t/t7600-merge.sh +++ b/t/t7600-merge.sh @@ -255,6 +255,15 @@ test_expect_success 'merge --squash c3 with c7' ' test_cmp expect actual ' +test_expect_success 'merge --squash --autostash conflict does not attempt to apply autostash' ' + git reset --hard c3 && + >unrelated && + git add unrelated && + test_must_fail git merge --squash c7 --autostash >out 2>err && + ! grep "Applying autostash resulted in conflicts." err && + grep "When finished, apply stashed changes with \`git stash pop\`" out +' + test_expect_success 'merge c3 with c7 with commit.cleanup = scissors' ' git config commit.cleanup scissors && git reset --hard c3 && |
