X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft7607-merge-overwrite.sh;h=72a8731d5e28d71577d0c53fc25a5ddc1d2ad6de;hb=ad29f71d53548266cc45d2fa99725e198c7f4887;hp=5f731a1177267e76f19dbe1605a4d0f2e8e749bd;hpb=75618f1106b95defafca698d5cfdfd3dfb3a7e3c;p=git.git diff --git a/t/t7607-merge-overwrite.sh b/t/t7607-merge-overwrite.sh index 5f731a117..72a8731d5 100755 --- a/t/t7607-merge-overwrite.sh +++ b/t/t7607-merge-overwrite.sh @@ -122,7 +122,7 @@ test_expect_success 'will not overwrite untracked file in leading path' ' rm -f sub sub2 ' -test_expect_failure SYMLINKS 'will not overwrite untracked symlink in leading path' ' +test_expect_success SYMLINKS 'will not overwrite untracked symlink in leading path' ' git reset --hard c0 && rm -rf sub && mkdir sub2 && @@ -151,11 +151,19 @@ test_expect_success 'will not overwrite untracked file on unborn branch' ' git checkout --orphan new && cp important c0.c && test_must_fail git merge c0 2>out && - test_cmp out expect && + test_i18ncmp out expect +' + +test_expect_success 'will not overwrite untracked file on unborn branch .git/MERGE_HEAD sanity etc.' ' + test_when_finished "rm c0.c" && test_path_is_missing .git/MERGE_HEAD && test_cmp important c0.c ' +test_expect_success 'failed merge leaves unborn branch in the womb' ' + test_must_fail git rev-parse --verify HEAD +' + test_expect_success 'set up unborn branch and content' ' git symbolic-ref HEAD refs/heads/unborn && rm -f .git/index && @@ -164,7 +172,7 @@ test_expect_success 'set up unborn branch and content' ' echo bar > untracked-file ' -test_expect_failure 'will not clobber WT/index when merging into unborn' ' +test_expect_success 'will not clobber WT/index when merging into unborn' ' git merge master && grep foo tracked-file && git show :tracked-file >expect &&