git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/5] t7615: be more explicit about diff algorithm used

From
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
Date
Mar 16, 2025, 06:58 UTC
Message-ID
<9f6a1669f39d26db8c9cd5c9db290f8708dce89b.1742108339.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1882.git.1742108339.gitgitgadget@gmail.com>
From: Elijah Newren <newren@gmail.com>

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>
---
 t/t7615-diff-algo-with-mergy-operations.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t7615-diff-algo-with-mergy-operations.sh b/t/t7615-diff-algo-with-mergy-operations.sh
index 3b1aad0167a..ac5863e788c 100755
--- a/t/t7615-diff-algo-with-mergy-operations.sh
+++ b/t/t7615-diff-algo-with-mergy-operations.sh
@@ -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' '
-- 
gitgitgadget
Previous: Elijah Newren via GitGitGadgetNext: Elijah Newren via GitGitGadget
Message 4 of 6 in “Miscellaneous fixups preparing for the removal of merge-recursive”
  1. 0/5 Miscellaneous fixups preparing for the removal of merge-recursiveElijah Newren via GitGitGadget, Mar 16, 2025
  2. 1/5 stash: remove merge-recursive.h includeElijah Newren via GitGitGadget, Mar 16, 2025
  3. 2/5 t6423: fix a comment that accidentally reversed two commitsElijah Newren via GitGitGadget, Mar 16, 2025
  4. 3/5 t7615: be more explicit about diff algorithm usedElijah Newren via GitGitGadget, Mar 16, 2025
  5. 4/5 merge-ort: fix accidental strset<->strintmapElijah Newren via GitGitGadget, Mar 16, 2025
  6. 5/5 merge-ort: remove extraneous word in commentElijah Newren via GitGitGadget, Mar 16, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.