summaryrefslogtreecommitdiff
path: root/t/t6423-merge-rename-directories.sh
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2020-10-26 17:01:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-26 19:31:24 (GMT)
commitc12d1f2ac227cbec44be27de83ef07d135f243c2 (patch)
treec9edc8e3ac3b9e0d11ff3132a9a9438be8ba7bc1 /t/t6423-merge-rename-directories.sh
parent727c75b23f25f752810f412e936d420f5c7fee04 (diff)
downloadgit-c12d1f2ac227cbec44be27de83ef07d135f243c2.zip
git-c12d1f2ac227cbec44be27de83ef07d135f243c2.tar.gz
git-c12d1f2ac227cbec44be27de83ef07d135f243c2.tar.bz2
t6423: expect improved conflict markers labels in the ort backend
Conflict markers carry an extra annotation of the form REF-OR-COMMIT:FILENAME to help distinguish where the content is coming from, with the :FILENAME piece being left off if it is the same for both sides of history (thus only renames with content conflicts carry that part of the annotation). However, there were cases where the :FILENAME annotation was accidentally left off, due to merge-recursive's every-codepath-needs-a-copy-of-all-special-case-code format. Update a few tests to have the correct :FILENAME extension on relevant paths with the ort backend, while leaving the expectation for merge-recursive the same to avoid destabilizing it. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6423-merge-rename-directories.sh')
-rwxr-xr-xt/t6423-merge-rename-directories.sh38
1 files changed, 28 insertions, 10 deletions
diff --git a/t/t6423-merge-rename-directories.sh b/t/t6423-merge-rename-directories.sh
index f9a3f24..7e32626 100755
--- a/t/t6423-merge-rename-directories.sh
+++ b/t/t6423-merge-rename-directories.sh
@@ -302,11 +302,20 @@ test_expect_success '1d: Directory renames cause a rename/rename(2to1) conflict'
git cat-file -p :2:x/wham >expect &&
git cat-file -p :3:x/wham >other &&
>empty &&
- test_must_fail git merge-file \
- -L "HEAD" \
- -L "" \
- -L "B^0" \
- expect empty other &&
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
+ then
+ test_must_fail git merge-file \
+ -L "HEAD:y/wham" \
+ -L "" \
+ -L "B^0:z/wham" \
+ expect empty other
+ else
+ test_must_fail git merge-file \
+ -L "HEAD" \
+ -L "" \
+ -L "B^0" \
+ expect empty other
+ fi &&
test_cmp expect x/wham
)
'
@@ -1823,11 +1832,20 @@ test_expect_success '7b: rename/rename(2to1), but only due to transitive rename'
git cat-file -p :2:y/d >expect &&
git cat-file -p :3:y/d >other &&
>empty &&
- test_must_fail git merge-file \
- -L "HEAD" \
- -L "" \
- -L "B^0" \
- expect empty other &&
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
+ then
+ test_must_fail git merge-file \
+ -L "HEAD:y/d" \
+ -L "" \
+ -L "B^0:z/d" \
+ expect empty other
+ else
+ test_must_fail git merge-file \
+ -L "HEAD" \
+ -L "" \
+ -L "B^0" \
+ expect empty other
+ fi &&
test_cmp expect y/d
)
'