summaryrefslogtreecommitdiff
path: root/sequencer.h
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2020-11-02 23:45:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-03 00:35:50 (GMT)
commit14c4586c2dfa94d86d71a60481dd20bc5b56e562 (patch)
tree86ef342952fc4a78c51723dfb96b89fb6cae7443 /sequencer.h
parentfe1a21d5267cae88d4312e3595909720717eb31c (diff)
downloadgit-14c4586c2dfa94d86d71a60481dd20bc5b56e562.zip
git-14c4586c2dfa94d86d71a60481dd20bc5b56e562.tar.gz
git-14c4586c2dfa94d86d71a60481dd20bc5b56e562.tar.bz2
merge,rebase,revert: select ort or recursive by config or environment
Allow the testsuite to run where it treats requests for "recursive" or the default merge algorithm via consulting the environment variable GIT_TEST_MERGE_ALGORITHM which is expected to either be "recursive" (the old traditional algorithm) or "ort" (the new algorithm). Also, allow folks to pick the new algorithm via config setting. It turns out builtin/merge.c already had a way to allow users to specify a different default merge algorithm: pull.twohead. Rather odd configuration name (especially to be in the 'pull' namespace rather than 'merge') but it's there. Add that same configuration to rebase, cherry-pick, and revert. This required updating the various callsites that called merge_trees() or merge_recursive() to conditionally call the new API, so this serves as another demonstration of what the new API looks and feels like. There are almost certainly some callsites that have not yet been modified to work with the new merge algorithm, but this represents the ones that I have been testing with thus far. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.h')
-rw-r--r--sequencer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sequencer.h b/sequencer.h
index b2a501e..020b7fa 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -57,6 +57,7 @@ struct replay_opts {
int explicit_cleanup;
/* Merge strategy */
+ char *default_strategy; /* from config options */
char *strategy;
char **xopts;
size_t xopts_nr, xopts_alloc;