Code

Merge branch 'ab/i18n-st'
[git.git] / t / t7607-merge-overwrite.sh
index c86e298d082316ff5a4de6f07c0faba85c65d4e1..ef84f04102ed067768c66ea9608b98d47851eb8b 100755 (executable)
@@ -150,13 +150,23 @@ test_expect_success 'will not overwrite untracked file on unborn branch' '
        git rm -fr . &&
        git checkout --orphan new &&
        cp important c0.c &&
+       test_must_fail git merge c0 2>out
+'
+
+test_expect_success C_LOCALE_OUTPUT 'will not overwrite untracked file on unborn branch: output' '
+       test_cmp 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_must_fail git merge c0 2>out &&
-       test_cmp out expect &&
        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 &&