From: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Elijah Newren <newren@gmail.com>, Elijah Newren <newren@gmail.com>
Subject: [PATCH 8/8] builtin/{merge,rebase,revert}: remove GIT_TEST_MERGE_ALGORITHM
Date: Mon, 31 Mar 2025 15:51:19 +0000 [thread overview]
Message-ID: <3abcfe6faf0759592d04d191c7cd4cdf93127965.1743436280.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1898.git.1743436279.gitgitgadget@gmail.com>
From: Elijah Newren <newren@gmail.com>
This environment variable existed to allow the testsuite to reuse all
the merge-related tests in the testsuite while easily flipping between
the 'recursive' and the 'ort' backends. Now that we have removed
merge-recursive and remapped 'recursive' to mean 'ort', we don't need
this scaffolding anymore. Remove it from these three builtins.
Signed-off-by: Elijah Newren <newren@gmail.com>
---
builtin/merge.c | 14 +-------------
builtin/rebase.c | 5 -----
builtin/revert.c | 2 --
3 files changed, 1 insertion(+), 20 deletions(-)
diff --git a/builtin/merge.c b/builtin/merge.c
index c0bbdab7104..9efd585842f 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -170,7 +170,7 @@ static struct strategy *get_strategy(const char *name)
struct strategy *ret;
static struct cmdnames main_cmds = {0}, other_cmds = {0};
static int loaded;
- char *default_strategy = getenv("GIT_TEST_MERGE_ALGORITHM");
+ char *default_strategy = NULL;
if (!name)
return NULL;
@@ -1311,12 +1311,6 @@ int cmd_merge(int argc,
if (branch)
skip_prefix(branch, "refs/heads/", &branch);
- if (!pull_twohead) {
- char *default_strategy = getenv("GIT_TEST_MERGE_ALGORITHM");
- if (default_strategy && !strcmp(default_strategy, "ort"))
- pull_twohead = xstrdup("ort");
- }
-
init_diff_ui_defaults();
git_config(git_merge_config, NULL);
@@ -1517,12 +1511,6 @@ int cmd_merge(int argc,
fast_forward = FF_NO;
}
- if (!use_strategies && !pull_twohead &&
- remoteheads && !remoteheads->next) {
- char *default_strategy = getenv("GIT_TEST_MERGE_ALGORITHM");
- if (default_strategy)
- append_strategy(get_strategy(default_strategy));
- }
if (!use_strategies) {
if (!remoteheads)
; /* already up-to-date */
diff --git a/builtin/rebase.c b/builtin/rebase.c
index d4715ed35d7..e83193ac73e 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1575,11 +1575,6 @@ int cmd_rebase(int argc,
options.default_backend);
}
- if (options.type == REBASE_MERGE &&
- !options.strategy &&
- getenv("GIT_TEST_MERGE_ALGORITHM"))
- options.strategy = xstrdup(getenv("GIT_TEST_MERGE_ALGORITHM"));
-
switch (options.type) {
case REBASE_MERGE:
options.state_dir = merge_dir();
diff --git a/builtin/revert.c b/builtin/revert.c
index aca6c293cdf..2654f769a88 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -252,8 +252,6 @@ static int run_sequencer(int argc, const char **argv, const char *prefix,
free(opts->strategy);
opts->strategy = xstrdup_or_null(strategy);
}
- if (!opts->strategy && getenv("GIT_TEST_MERGE_ALGORITHM"))
- opts->strategy = xstrdup(getenv("GIT_TEST_MERGE_ALGORITHM"));
free(options);
if (cmd == 'q') {
--
gitgitgadget
next prev parent reply other threads:[~2025-03-31 15:51 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 ` Elijah Newren via GitGitGadget [this message]
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 ` [PATCH v3 " Elijah Newren via GitGitGadget
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=3abcfe6faf0759592d04d191c7cd4cdf93127965.1743436280.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=newren@gmail.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).