From: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Eric Sunshine <sunshine@sunshineco.com>,
Elijah Newren <newren@gmail.com>,
Elijah Newren <newren@gmail.com>
Subject: [PATCH v3 0/8] Debug merge-recursive.[ch]
Date: Tue, 08 Apr 2025 15:48:34 +0000 [thread overview]
Message-ID: <pull.1898.v3.git.1744127322.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1898.v2.git.1743891374.gitgitgadget@gmail.com>
Changes since v1:
* fixed a couple of typos in commit messages
Changes since v2.
* clarified the commit message for patch 6, and the cover letter
Clarified cover letter:
As a wise man once told me, "Deleted code is debugged code!"
This series does some preparation, then moves the code shared between
merge-recursive and merge-ort from the former to the latter, and then
"debugs" the remainder of merge-recursive.[ch].
Joking aside, merge-ort was always intended to replace merge-recursive. It
did replace it as the default years ago in commit 6a5fb966720f (Change
default merge backend from recursive to ort, 2021-08-04), and was noted to
be better on correctness, extensibility, and performance issues. In this
series, we convert the remaining callers of merge-recursive over to
merge-ort equivalents, move the shared code between merge-recursive and
merge-ort from the former to the latter, and then delete the remainder of
merge-recursive.[ch] as it has now been fully replaced. We then clean up
some test framework scaffolding that was put into place to allow us to reuse
the recursive tests as ort tests.
Series overview:
* Patches 1-5: Preparation; switch remaining callers of
merge-recursive.[ch] functions to merge-ort equivalents, and add sole
remaining missing feature (diff-algorithm selection)
* Patch 6: Nuke merge-recursive.[ch]
* Patch 7-8: Cleanup testsuite; we don't need GIT_TEST_MERGE_ALGORITHM
anymore
While the diffstat might look large, the non-test code changes are actually
pretty small. The drivers of the big diffstat are:
* We move a significant chunk of shared code from merge-recursive.[ch] to
merge-ort.[ch], without modifying it
* We delete (the remainder of) merge-recursive.[ch]
* We rip out all the temporary GIT_TEST_MERGE_ALGORITHM stuff designed to
let us reuse tests between recursive and ort
Elijah Newren (8):
checkout: replace merge_trees() with merge_ort_nonrecursive()
builtin/merge-recursive: switch to using merge_ort_generic()
merge-ort: enable diff-algorithms other than histogram
sequencer: switch non-recursive merges over to ort
merge, sequencer: switch recursive merges over to ort
merge-recursive.[ch]: thoroughly debug these
tests: remove GIT_TEST_MERGE_ALGORITHM and test_expect_merge_algorithm
builtin/{merge,rebase,revert}: remove GIT_TEST_MERGE_ALGORITHM
Documentation/merge-strategies.adoc | 51 +-
Documentation/technical/sparse-checkout.adoc | 2 -
Makefile | 1 -
builtin/checkout.c | 10 +-
builtin/merge-recursive.c | 4 +-
builtin/merge.c | 23 +-
builtin/rebase.c | 5 -
builtin/revert.c | 2 -
ci/run-build-and-tests.sh | 1 -
merge-ort-wrappers.h | 2 +-
merge-ort.c | 162 +-
merge-ort.h | 60 +-
merge-recursive.c | 4079 -----------------
merge-recursive.h | 132 -
meson.build | 1 -
sequencer.c | 58 +-
t/lib-merge.sh | 13 -
t/t1092-sparse-checkout-compatibility.sh | 2 -
t/t2501-cwd-empty.sh | 2 -
t/t3512-cherry-pick-submodule.sh | 5 -
t/t3513-revert-submodule.sh | 4 -
t/t4069-remerge-diff.sh | 7 -
t/t4301-merge-tree-write-tree.sh | 7 -
t/t5572-pull-submodule.sh | 5 -
t/t6400-merge-df.sh | 14 +-
t/t6402-merge-rename.sh | 125 +-
t/t6404-recursive-merge.sh | 21 +-
t/t6406-merge-attr.sh | 7 +-
t/t6416-recursive-corner-cases.sh | 194 +-
t/t6421-merge-partial-clone.sh | 7 +-
t/t6422-merge-rename-corner-cases.sh | 31 +-
t/t6423-merge-rename-directories.sh | 517 +--
t/t6424-merge-unrelated-index-changes.sh | 8 +-
t/t6426-merge-skip-unneeded-updates.sh | 4 +-
t/t6428-merge-conflicts-sparse.sh | 2 -
t/t6430-merge-recursive.sh | 46 +-
t/t6434-merge-recursive-rename-options.sh | 16 +-
t/t6436-merge-overwrite.sh | 17 +-
t/t6437-submodule-merge.sh | 65 +-
t/t6438-submodule-directory-file-conflicts.sh | 5 -
t/t6439-merge-co-error-msgs.sh | 2 +-
t/t7402-submodule-rebase.sh | 7 +-
t/t7602-merge-octopus-many.sh | 9 +-
t/t7610-mergetool.sh | 40 +-
t/t7615-diff-algo-with-mergy-operations.sh | 2 -
t/test-lib.sh | 2 -
46 files changed, 538 insertions(+), 5241 deletions(-)
delete mode 100644 merge-recursive.c
delete mode 100644 merge-recursive.h
delete mode 100644 t/lib-merge.sh
base-commit: 5b97a56fa0e7d580dc8865b73107407c9b3f0eff
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1898%2Fnewren%2Fendit-quote-debugging-unquote-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1898/newren/endit-quote-debugging-unquote-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/1898
Range-diff vs v2:
1: 0e150ee9065 = 1: 0e150ee9065 checkout: replace merge_trees() with merge_ort_nonrecursive()
2: b093d74968b = 2: b093d74968b builtin/merge-recursive: switch to using merge_ort_generic()
3: cf774437123 = 3: cf774437123 merge-ort: enable diff-algorithms other than histogram
4: 6203589ac17 = 4: 6203589ac17 sequencer: switch non-recursive merges over to ort
5: 8821f22d5ea = 5: 8821f22d5ea merge, sequencer: switch recursive merges over to ort
6: 770f611c2b6 ! 6: e696cb472bd merge-recursive.[ch]: thoroughly debug these
@@ Commit message
the former to the latter, and then debug the remainder of
merge-recursive.[ch].
+ Joking aside, merge-ort was always intended to replace merge-recursive.
+ It has numerous advantages over merge-recursive (operates much faster,
+ can operate without a worktree or index, and fixes a number of known
+ bugs and suboptimal merges). Since we have now replaced all callers of
+ merge-recursive with equivalent functions from merge-ort, move the
+ shared functions from the former to the latter, and delete the remainder
+ of merge-recursive.[ch].
+
Signed-off-by: Elijah Newren <newren@gmail.com>
## Documentation/merge-strategies.adoc ##
7: a6501ee85fa = 7: 5dce9096e23 tests: remove GIT_TEST_MERGE_ALGORITHM and test_expect_merge_algorithm
8: d1dea986646 = 8: bf2d462c4e5 builtin/{merge,rebase,revert}: remove GIT_TEST_MERGE_ALGORITHM
--
gitgitgadget
next prev parent reply other threads:[~2025-04-08 15:48 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 15:51 [PATCH 0/8] Debug merge-recursive.[ch] Elijah Newren via GitGitGadget
2025-03-31 15:51 ` [PATCH 1/8] checkout: replace merge_trees() with merge_ort_nonrecursive() Elijah Newren via GitGitGadget
2025-03-31 15:51 ` [PATCH 2/8] builtin/merge-recursive: switch to using merge_ort_generic() Elijah Newren via GitGitGadget
2025-03-31 15:51 ` [PATCH 3/8] merge-ort: enable diff-algorithms other than histogram Elijah Newren via GitGitGadget
2025-03-31 15:51 ` [PATCH 4/8] sequencer: switch non-recursive merges over to ort Elijah Newren via GitGitGadget
2025-03-31 15:51 ` [PATCH 5/8] merge, sequencer: switch recursive " Elijah Newren via GitGitGadget
2025-03-31 15:51 ` [PATCH 6/8] merge-recursive.[ch]: thoroughly debug these Elijah Newren via GitGitGadget
2025-03-31 15:51 ` [PATCH 7/8] tests: remove GIT_TEST_MERGE_ALGORITHM and test_expect_merge_algorithm Elijah Newren via GitGitGadget
2025-03-31 17:34 ` Eric Sunshine
2025-03-31 18:14 ` Elijah Newren
2025-03-31 15:51 ` [PATCH 8/8] builtin/{merge,rebase,revert}: remove GIT_TEST_MERGE_ALGORITHM Elijah Newren via GitGitGadget
2025-04-05 22:16 ` [PATCH v2 0/8] Debug merge-recursive.[ch] Elijah Newren via GitGitGadget
2025-04-05 22:16 ` [PATCH v2 1/8] checkout: replace merge_trees() with merge_ort_nonrecursive() Elijah Newren via GitGitGadget
2025-04-05 22:16 ` [PATCH v2 2/8] builtin/merge-recursive: switch to using merge_ort_generic() Elijah Newren via GitGitGadget
2025-04-05 22:16 ` [PATCH v2 3/8] merge-ort: enable diff-algorithms other than histogram Elijah Newren via GitGitGadget
2025-04-05 22:16 ` [PATCH v2 4/8] sequencer: switch non-recursive merges over to ort Elijah Newren via GitGitGadget
2025-04-05 22:16 ` [PATCH v2 5/8] merge, sequencer: switch recursive " Elijah Newren via GitGitGadget
2025-04-05 22:16 ` [PATCH v2 6/8] merge-recursive.[ch]: thoroughly debug these Elijah Newren via GitGitGadget
2025-04-05 22:16 ` [PATCH v2 7/8] tests: remove GIT_TEST_MERGE_ALGORITHM and test_expect_merge_algorithm Elijah Newren via GitGitGadget
2025-04-05 22:16 ` [PATCH v2 8/8] builtin/{merge,rebase,revert}: remove GIT_TEST_MERGE_ALGORITHM Elijah Newren via GitGitGadget
2025-04-07 20:09 ` [PATCH v2 0/8] Debug merge-recursive.[ch] Junio C Hamano
2025-04-07 22:23 ` Elijah Newren
2025-04-08 15:48 ` Elijah Newren via GitGitGadget [this message]
2025-04-08 15:48 ` [PATCH v3 1/8] checkout: replace merge_trees() with merge_ort_nonrecursive() Elijah Newren via GitGitGadget
2025-04-08 15:48 ` [PATCH v3 2/8] builtin/merge-recursive: switch to using merge_ort_generic() Elijah Newren via GitGitGadget
2025-04-08 15:48 ` [PATCH v3 3/8] merge-ort: enable diff-algorithms other than histogram Elijah Newren via GitGitGadget
2025-04-08 15:48 ` [PATCH v3 4/8] sequencer: switch non-recursive merges over to ort Elijah Newren via GitGitGadget
2025-04-08 15:48 ` [PATCH v3 5/8] merge, sequencer: switch recursive " Elijah Newren via GitGitGadget
2025-04-08 15:48 ` [PATCH v3 6/8] merge-recursive.[ch]: thoroughly debug these Elijah Newren via GitGitGadget
2025-04-08 15:48 ` [PATCH v3 7/8] tests: remove GIT_TEST_MERGE_ALGORITHM and test_expect_merge_algorithm Elijah Newren via GitGitGadget
2025-04-08 15:48 ` [PATCH v3 8/8] builtin/{merge,rebase,revert}: remove GIT_TEST_MERGE_ALGORITHM Elijah Newren via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.1898.v3.git.1744127322.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).