Skip to content

Commit c12d1f2

Browse files
newrengitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 727c75b commit c12d1f2

File tree

1 file changed

+28
-10
lines changed

1 file changed

+28
-10
lines changed

t/t6423-merge-rename-directories.sh

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,20 @@ test_expect_success '1d: Directory renames cause a rename/rename(2to1) conflict'
302302
git cat-file -p :2:x/wham >expect &&
303303
git cat-file -p :3:x/wham >other &&
304304
>empty &&
305-
test_must_fail git merge-file \
306-
-L "HEAD" \
307-
-L "" \
308-
-L "B^0" \
309-
expect empty other &&
305+
if test "$GIT_TEST_MERGE_ALGORITHM" = ort
306+
then
307+
test_must_fail git merge-file \
308+
-L "HEAD:y/wham" \
309+
-L "" \
310+
-L "B^0:z/wham" \
311+
expect empty other
312+
else
313+
test_must_fail git merge-file \
314+
-L "HEAD" \
315+
-L "" \
316+
-L "B^0" \
317+
expect empty other
318+
fi &&
310319
test_cmp expect x/wham
311320
)
312321
'
@@ -1823,11 +1832,20 @@ test_expect_success '7b: rename/rename(2to1), but only due to transitive rename'
18231832
git cat-file -p :2:y/d >expect &&
18241833
git cat-file -p :3:y/d >other &&
18251834
>empty &&
1826-
test_must_fail git merge-file \
1827-
-L "HEAD" \
1828-
-L "" \
1829-
-L "B^0" \
1830-
expect empty other &&
1835+
if test "$GIT_TEST_MERGE_ALGORITHM" = ort
1836+
then
1837+
test_must_fail git merge-file \
1838+
-L "HEAD:y/d" \
1839+
-L "" \
1840+
-L "B^0:z/d" \
1841+
expect empty other
1842+
else
1843+
test_must_fail git merge-file \
1844+
-L "HEAD" \
1845+
-L "" \
1846+
-L "B^0" \
1847+
expect empty other
1848+
fi &&
18311849
test_cmp expect y/d
18321850
)
18331851
'

0 commit comments

Comments
 (0)