The sixth batch for 2.18
[gitweb.git] / t / t6036-recursive-corner-cases.sh
index cc1ee6aa7ff2fb4b87043c84368dca8a4f7a34f1..18aa88b5c096c14f2f8a3a8d8c6488127fddf055 100755 (executable)
@@ -86,7 +86,7 @@ test_expect_success 'setup criss-cross + rename merges with basic modification'
        rm -rf .git &&
        git init &&
 
-       ten="0 1 2 3 4 5 6 7 8 9"
+       ten="0 1 2 3 4 5 6 7 8 9" &&
        for i in $ten
        do
                echo line $i in a sample file
@@ -195,12 +195,7 @@ test_expect_success 'git detects differently handled merges conflict' '
        git reset --hard &&
        git checkout D^0 &&
 
-       git merge -s recursive E^0 && {
-               echo "BAD: should have conflicted"
-               test "Incorrectly merged content" = "$(cat new_a)" &&
-                       echo "BAD: Silently accepted wrong content"
-               return 1
-       }
+       test_must_fail git merge -s recursive E^0 &&
 
        test 3 = $(git ls-files -s | wc -l) &&
        test 3 = $(git ls-files -u | wc -l) &&
@@ -304,89 +299,6 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete, rev
        test $(git rev-parse :3:file) = $(git rev-parse B:file)
 '
 
-#
-# criss-cross + modify/modify with very contrived file contents:
-#
-#      B   D
-#      o---o
-#     / \ / \
-#  A o   X   ? F
-#     \ / \ /
-#      o---o
-#      C   E
-#
-#   Commit A: file with contents 'A\n'
-#   Commit B: file with contents 'B\n'
-#   Commit C: file with contents 'C\n'
-#   Commit D: file with contents 'D\n'
-#   Commit E: file with contents:
-#      <<<<<<< Temporary merge branch 1
-#      C
-#      =======
-#      B
-#      >>>>>>> Temporary merge branch 2
-#
-# Now, when we merge commits D & E, does git detect the conflict?
-
-test_expect_success 'setup differently handled merges of content conflict' '
-       git clean -fdqx &&
-       rm -rf .git &&
-       git init &&
-
-       echo A >file &&
-       git add file &&
-       test_tick &&
-       git commit -m A &&
-
-       git branch B &&
-       git checkout -b C &&
-       echo C >file &&
-       git add file &&
-       test_tick &&
-       git commit -m C &&
-
-       git checkout B &&
-       echo B >file &&
-       git add file &&
-       test_tick &&
-       git commit -m B &&
-
-       git checkout B^0 &&
-       test_must_fail git merge C &&
-       echo D >file &&
-       git add file &&
-       test_tick &&
-       git commit -m D &&
-       git tag D &&
-
-       git checkout C^0 &&
-       test_must_fail git merge B &&
-       cat <<EOF >file &&
-<<<<<<< Temporary merge branch 1
-C
-=======
-B
->>>>>>> Temporary merge branch 2
-EOF
-       git add file &&
-       test_tick &&
-       git commit -m E &&
-       git tag E
-'
-
-test_expect_failure 'git detects conflict w/ criss-cross+contrived resolution' '
-       git checkout D^0 &&
-
-       test_must_fail git merge -s recursive E^0 &&
-
-       test 3 -eq $(git ls-files -s | wc -l) &&
-       test 3 -eq $(git ls-files -u | wc -l) &&
-       test 0 -eq $(git ls-files -o | wc -l) &&
-
-       test $(git rev-parse :2:file) = $(git rev-parse D:file) &&
-       test $(git rev-parse :3:file) = $(git rev-parse E:file)
-'
-
 #
 # criss-cross + d/f conflict via add/add:
 #   Commit A: Neither file 'a' nor directory 'a/' exists.
@@ -534,7 +446,7 @@ test_expect_success 'merge of E2 & D fails but has appropriate contents' '
 
        test $(git rev-parse :3:a) = $(git rev-parse B:a) &&
        test $(git rev-parse :2:a/file) = $(git rev-parse E2:a/file) &&
-       test $(git rev-parse :1:a/file) = $(git rev-parse C:a/file)
+       test $(git rev-parse :1:a/file) = $(git rev-parse C:a/file) &&
        test $(git rev-parse :0:ignore-me) = $(git rev-parse A:ignore-me) &&
 
        test -f a~D^0