{"thread":{"id":"63143","subject":"[PATCH 0/5] Miscellaneous fixups preparing for the removal of merge-recursive","startedAt":"2025-03-16T06:59:02Z","lastAt":"2025-03-16T06:59:07Z","messageCount":6,"participants":["Elijah Newren via GitGitGadget"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"514384","messageId":"pull.1882.git.1742108339.gitgitgadget@gmail.com","threadId":"63143","inReplyTo":null,"subject":"[PATCH 0/5] Miscellaneous fixups preparing for the removal of merge-recursive","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-03-16T06:58:54Z","receivedAt":"2025-03-16T06:59:02Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"While working on the removal of merge recursive, there were a handful of\nmiscellaneous fixups, none of which changed any behavior. Each is a very\nsmall localized change. This does not depend on any other PRs, and in fact\neach commit in this series is orthogonal. I'm just grouping them because\nthey are all tiny, miscellaneous fixups.\n\nElijah Newren (5):\n  stash: remove merge-recursive.h include\n  t6423: fix a comment that accidentally reversed two commits\n  t7615: be more explicit about diff algorithm used\n  merge-ort: fix accidental strset<->strintmap\n  merge-ort: remove extraneous word in comment\n\n builtin/stash.c                            |  1 -\n merge-ort.c                                | 10 +++++-----\n t/t6423-merge-rename-directories.sh        |  6 +++---\n t/t7615-diff-algo-with-mergy-operations.sh |  4 ++--\n 4 files changed, 10 insertions(+), 11 deletions(-)\n\n\nbase-commit: c9d3534de317f31915f37e9d9c0d52d4cf901482\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1882%2Fnewren%2Fendit-misc-fixups-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1882/newren/endit-misc-fixups-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1882\n-- \ngitgitgadget\n"},{"id":"514385","messageId":"d5611e8d666520d174c3839c10d55484657bb1b7.1742108339.git.gitgitgadget@gmail.com","threadId":"63143","inReplyTo":"pull.1882.git.1742108339.gitgitgadget@gmail.com","subject":"[PATCH 1/5] stash: remove merge-recursive.h include","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-03-16T06:58:55Z","receivedAt":"2025-03-16T06:59:03Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nstash was modified to use merge_ort_nonrecursive() instead of\nmerge_recursive_generic() back in commit 874cf2a60444 (stash: apply\nstash using 'merge_ort_nonrecursive()', 2022-05-10).  That makes the\ninclusion of merge-recursive.h unnecessary.  In preparation for the\nremoval of merge-recursive.h, remove the unnecessary include.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n builtin/stash.c | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/builtin/stash.c b/builtin/stash.c\nindex dbaa999cf17..cfbd92852a6 100644\n--- a/builtin/stash.c\n+++ b/builtin/stash.c\n@@ -13,7 +13,6 @@\n #include \"lockfile.h\"\n #include \"cache-tree.h\"\n #include \"unpack-trees.h\"\n-#include \"merge-recursive.h\"\n #include \"merge-ort-wrappers.h\"\n #include \"strvec.h\"\n #include \"run-command.h\"\n-- \ngitgitgadget\n\n"},{"id":"514386","messageId":"0d42acaf5d45cd205abeb848670017d7253ab7ba.1742108339.git.gitgitgadget@gmail.com","threadId":"63143","inReplyTo":"pull.1882.git.1742108339.gitgitgadget@gmail.com","subject":"[PATCH 2/5] t6423: fix a comment that accidentally reversed two commits","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-03-16T06:58:56Z","receivedAt":"2025-03-16T06:59:04Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nThe comment describing testcase 13b of t6423 somehow mixed up commits\nA and B in one paragraph.  Fix the references.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n t/t6423-merge-rename-directories.sh | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t6423-merge-rename-directories.sh b/t/t6423-merge-rename-directories.sh\nindex 94080c65d12..ebf47cdd6b2 100755\n--- a/t/t6423-merge-rename-directories.sh\n+++ b/t/t6423-merge-rename-directories.sh\n@@ -5549,9 +5549,9 @@ test_expect_success '13b(info): messages for transitive rename with conflicted c\n #   Commit A: y/{b,c,d}, x/e\n #   Commit B: z/{b,c,d}, x/e\n #   Expected: y/{b,c,d}, x/e, with info or conflict messages for d\n-#             A: renamed x/d -> z/d; B: renamed z/ -> y/ AND renamed x/d to y/d\n-#             One could argue A had partial knowledge of what was done with\n-#             d and B had full knowledge, but that's a slippery slope as\n+#             B: renamed x/d -> z/d; A: renamed z/ -> y/ AND renamed x/d to y/d\n+#             One could argue B had partial knowledge of what was done with\n+#             d and A had full knowledge, but that's a slippery slope as\n #             shown in testcase 13d.\n \n test_setup_13c () {\n-- \ngitgitgadget\n\n"},{"id":"514387","messageId":"9f6a1669f39d26db8c9cd5c9db290f8708dce89b.1742108339.git.gitgitgadget@gmail.com","threadId":"63143","inReplyTo":"pull.1882.git.1742108339.gitgitgadget@gmail.com","subject":"[PATCH 3/5] t7615: be more explicit about diff algorithm used","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-03-16T06:58:57Z","receivedAt":"2025-03-16T06:59:05Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nt7615 is entirely about testing the differences about different\ndiff algorithms, but it doesn't specify any diff algorithm when it\nis testing myers.  Given that we have discussed potentially switching\ndefaults (https://lore.kernel.org/git/xmqqed873vgn.fsf@gitster.g/), it\nmakes sense in tests that are about different diff algorithms to be\nexplicitly about which one is intended to be used in each test.  Add\nthat specificity.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n t/t7615-diff-algo-with-mergy-operations.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t7615-diff-algo-with-mergy-operations.sh b/t/t7615-diff-algo-with-mergy-operations.sh\nindex 3b1aad0167a..ac5863e788c 100755\n--- a/t/t7615-diff-algo-with-mergy-operations.sh\n+++ b/t/t7615-diff-algo-with-mergy-operations.sh\n@@ -26,7 +26,7 @@ GIT_TEST_MERGE_ALGORITHM=recursive\n \n test_expect_success 'merge c2 to c1 with recursive merge strategy fails with the current default myers diff algorithm' '\n \tgit reset --hard c1 &&\n-\ttest_must_fail git merge -s recursive c2\n+\ttest_must_fail git merge -s recursive -Xdiff-algorithm=myers c2\n '\n \n test_expect_success 'merge c2 to c1 with recursive merge strategy succeeds with -Xdiff-algorithm=histogram' '\n@@ -42,7 +42,7 @@ test_expect_success 'merge c2 to c1 with recursive merge strategy succeeds with\n \n test_expect_success 'cherry-pick c2 to c1 with recursive merge strategy fails with the current default myers diff algorithm' '\n \tgit reset --hard c1 &&\n-\ttest_must_fail git cherry-pick -s recursive c2\n+\ttest_must_fail git cherry-pick -s recursive -Xdiff-algorithm=myers c2\n '\n \n test_expect_success 'cherry-pick c2 to c1 with recursive merge strategy succeeds with -Xdiff-algorithm=histogram' '\n-- \ngitgitgadget\n\n"},{"id":"514388","messageId":"97fa3d73e88edb5d07ae073c4bf9afa521982600.1742108339.git.gitgitgadget@gmail.com","threadId":"63143","inReplyTo":"pull.1882.git.1742108339.gitgitgadget@gmail.com","subject":"[PATCH 4/5] merge-ort: fix accidental strset<->strintmap","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-03-16T06:58:58Z","receivedAt":"2025-03-16T06:59:06Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nBoth strset_for_each_entry and strintmap_for_each_entry are macros that\nevaluate to the same thing, so they are technically interchangeable.\nHowever, the intent is that we use the one matching the variable type we\nare passing.  Unfortunately, I somehow mistakenly got one of these wrong\nin 7bee6c100431 (merge-ort: avoid recursing into directories when we\ndon't need to, 2021-07-16) -- possibly related to the fact that\nrelevant_sources was initially a strset and later refactored into a\nstrintmap.  Correct which macro we use.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n merge-ort.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/merge-ort.c b/merge-ort.c\nindex 46e78c3ffa6..a12aa213b06 100644\n--- a/merge-ort.c\n+++ b/merge-ort.c\n@@ -1517,8 +1517,8 @@ static int handle_deferred_entries(struct merge_options *opt,\n \t\tstruct strintmap copy;\n \n \t\t/* Loop over the set of paths we need to know rename info for */\n-\t\tstrset_for_each_entry(&renames->relevant_sources[side],\n-\t\t\t\t      &iter, entry) {\n+\t\tstrintmap_for_each_entry(&renames->relevant_sources[side],\n+\t\t\t\t\t &iter, entry) {\n \t\t\tchar *rename_target, *dir, *dir_marker;\n \t\t\tstruct strmap_entry *e;\n \n-- \ngitgitgadget\n\n"},{"id":"514389","messageId":"456a30ff72a3126439e8253238423b37b772c914.1742108339.git.gitgitgadget@gmail.com","threadId":"63143","inReplyTo":"pull.1882.git.1742108339.gitgitgadget@gmail.com","subject":"[PATCH 5/5] merge-ort: remove extraneous word in comment","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-03-16T06:58:59Z","receivedAt":"2025-03-16T06:59:07Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\n\"is was\" -> \"was\"\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n merge-ort.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/merge-ort.c b/merge-ort.c\nindex a12aa213b06..9efc2285a94 100644\n--- a/merge-ort.c\n+++ b/merge-ort.c\n@@ -3423,9 +3423,9 @@ static int collect_renames(struct merge_options *opt,\n \n \t\t/*\n \t\t * p->score comes back from diffcore_rename_extended() with\n-\t\t * the similarity of the renamed file.  The similarity is\n-\t\t * was used to determine that the two files were related\n-\t\t * and are a rename, which we have already used, but beyond\n+\t\t * the similarity of the renamed file.  The similarity was\n+\t\t * used to determine that the two files were related and\n+\t\t * are a rename, which we have already used, but beyond\n \t\t * that we have no use for the similarity.  So p->score is\n \t\t * now irrelevant.  However, process_renames() will need to\n \t\t * know which side of the merge this rename was associated\n-- \ngitgitgadget\n"}]}