Code

Merge branch 'jc/apply-blank-at-eof-fix' into maint
[git.git] / t / t6042-merge-rename-corner-cases.sh
index 968055d47cfe2cd55110c606d694c76b648934fe..32591f94135755847b406389aba5779e73cff5e0 100755 (executable)
@@ -258,7 +258,7 @@ test_expect_success 'rename/directory conflict + clean content merge' '
        test -f newfile~HEAD
 '
 
-test_expect_failure 'rename/directory conflict + content merge conflict' '
+test_expect_success 'rename/directory conflict + content merge conflict' '
        git reset --hard &&
        git reset --hard &&
        git clean -fdqx &&
@@ -376,7 +376,7 @@ test_expect_success 'setup rename/rename (2to1) + modify/modify' '
        git commit -m C
 '
 
-test_expect_failure 'handle rename/rename (2to1) conflict correctly' '
+test_expect_success 'handle rename/rename (2to1) conflict correctly' '
        git checkout B^0 &&
 
        test_must_fail git merge -s recursive C^0 >out &&
@@ -551,19 +551,28 @@ test_expect_success 'setup rename/rename(1to2)/add-dest conflict' '
        git commit -m two
 '
 
-test_expect_failure 'rename/rename/add-dest merge still knows about conflicting file versions' '
+test_expect_success 'rename/rename/add-dest merge still knows about conflicting file versions' '
        git checkout C^0 &&
        test_must_fail git merge -s recursive B^0 &&
 
        test 5 -eq $(git ls-files -s | wc -l) &&
        test 2 -eq $(git ls-files -u b | wc -l) &&
        test 2 -eq $(git ls-files -u c | wc -l) &&
+       test 4 -eq $(git ls-files -o | wc -l) &&
 
        test $(git rev-parse :1:a) = $(git rev-parse A:a) &&
        test $(git rev-parse :2:b) = $(git rev-parse C:b) &&
        test $(git rev-parse :3:b) = $(git rev-parse B:b) &&
        test $(git rev-parse :2:c) = $(git rev-parse C:c) &&
-       test $(git rev-parse :3:c) = $(git rev-parse B:c)
+       test $(git rev-parse :3:c) = $(git rev-parse B:c) &&
+
+       test $(git hash-object c~HEAD) = $(git rev-parse C:c) &&
+       test $(git hash-object c~B\^0) = $(git rev-parse B:c) &&
+       test $(git hash-object b~HEAD) = $(git rev-parse C:b) &&
+       test $(git hash-object b~B\^0) = $(git rev-parse B:b) &&
+
+       test ! -f b &&
+       test ! -f c
 '
 
 test_done