]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t7615: be more explicit about diff algorithm used
authorElijah Newren <newren@gmail.com>
Sun, 16 Mar 2025 06:58:57 +0000 (06:58 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Mar 2025 22:39:03 +0000 (15:39 -0700)
t7615 is entirely about testing the differences about different
diff algorithms, but it doesn't specify any diff algorithm when it
is testing myers.  Given that we have discussed potentially switching
defaults (https://lore.kernel.org/git/xmqqed873vgn.fsf@gitster.g/), it
makes sense in tests that are about different diff algorithms to be
explicitly about which one is intended to be used in each test.  Add
that specificity.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7615-diff-algo-with-mergy-operations.sh

index 3b1aad0167a402e8e0dbecad4c525fa3db49ede8..ac5863e788c2ec6499d990aeb93e19231c9d6c3f 100755 (executable)
@@ -26,7 +26,7 @@ GIT_TEST_MERGE_ALGORITHM=recursive
 
 test_expect_success 'merge c2 to c1 with recursive merge strategy fails with the current default myers diff algorithm' '
        git reset --hard c1 &&
-       test_must_fail git merge -s recursive c2
+       test_must_fail git merge -s recursive -Xdiff-algorithm=myers c2
 '
 
 test_expect_success 'merge c2 to c1 with recursive merge strategy succeeds with -Xdiff-algorithm=histogram' '
@@ -42,7 +42,7 @@ test_expect_success 'merge c2 to c1 with recursive merge strategy succeeds with
 
 test_expect_success 'cherry-pick c2 to c1 with recursive merge strategy fails with the current default myers diff algorithm' '
        git reset --hard c1 &&
-       test_must_fail git cherry-pick -s recursive c2
+       test_must_fail git cherry-pick -s recursive -Xdiff-algorithm=myers c2
 '
 
 test_expect_success 'cherry-pick c2 to c1 with recursive merge strategy succeeds with -Xdiff-algorithm=histogram' '