summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-04-27 15:05:57 -0700
committerJunio C Hamano <gitster@pobox.com>2016-05-09 15:42:55 -0700
commit0f9fd5c91739f62bc0c2291fe6dd6d7e1d1fa901 (patch)
treeeb63986d525509241442dfb80994f0cd7927b8c8
parentd694a17986a28bbc19e2a6c32404ca24572e400f (diff)
downloadgit-jc/ll-merge-internal.tar.gz
t6036: remove pointless test that expects failurejc/ll-merge-internal
One test in t6036 prepares a file whose contents contain these lines: <<<<<<< Temporary merge branch 1 C ======= B >>>>>>> Temporary merge branch 2 and uses recursive merge strategy to run criss-cross merge with it. Manual merge resolution by users fundamentally depends on being able to distinguish the tracked contents from the separator lines added by "git merge" in order to allow users to tell which block of lines came from where. You can deliberately craft a file with lines that resemble conflict marker lines to make it impossible for the user (the outer merge of merge-recursive counts as a user of the result of "virtual parent" merge) to tell which part is which, and write a test to demonstrate that with such a file that "git merge" cannot fundamentally work well and has to fail. It however is pointless and waste of time and resource to run such a test that asserts the obvious. In real life, people who do need to track files with such lines that have <<<< ==== >>>> as their prefixes set the conflict-marker-size attribute to make sure they will be able to tell between the tracked lines that happen to begin with these (confusing) prefixes and the marker lines that are added by "git merge". Remove the test as pointless waste of resource. Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t6036-recursive-corner-cases.sh83
1 files changed, 0 insertions, 83 deletions
diff --git a/t/t6036-recursive-corner-cases.sh b/t/t6036-recursive-corner-cases.sh
index cc1ee6aa7f..c7b0ae6379 100755
--- a/t/t6036-recursive-corner-cases.sh
+++ b/t/t6036-recursive-corner-cases.sh
@@ -305,89 +305,6 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete, rev
'
#
-# 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.
# Commit B: Introduce 'a'