summaryrefslogtreecommitdiff
path: root/builtin/revert.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-11-18 13:32:53 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-11-18 13:32:53 -0800
commita1f95951efc55c97477e32287b06e204553be5c2 (patch)
tree65bda8319dd00e2e2bab2a2a4d77ca1e8f41944a /builtin/revert.c
parentMerge branch 'ds/maintenance-part-3' (diff)
parentmerge,rebase,revert: select ort or recursive by config or environment (diff)
downloadtgif-a1f95951efc55c97477e32287b06e204553be5c2.tar.xz
Merge branch 'en/merge-ort-api-null-impl'
Preparation for a new merge strategy. * en/merge-ort-api-null-impl: merge,rebase,revert: select ort or recursive by config or environment fast-rebase: demonstrate merge-ort's API via new test-tool command merge-ort-wrappers: new convience wrappers to mimic the old merge API merge-ort: barebones API of new merge strategy with empty implementation
Diffstat (limited to 'builtin/revert.c')
-rw-r--r--builtin/revert.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/builtin/revert.c b/builtin/revert.c
index da8997dc86..314a86c562 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -172,6 +172,11 @@ static int run_sequencer(int argc, const char **argv, struct replay_opts *opts)
NULL);
}
+ if (!opts->strategy && opts->default_strategy) {
+ opts->strategy = opts->default_strategy;
+ opts->default_strategy = NULL;
+ }
+
if (opts->allow_ff)
verify_opt_compatible(me, "--ff",
"--signoff", opts->signoff,
@@ -202,6 +207,8 @@ static int run_sequencer(int argc, const char **argv, struct replay_opts *opts)
/* These option values will be free()d */
opts->gpg_sign = xstrdup_or_null(opts->gpg_sign);
opts->strategy = xstrdup_or_null(opts->strategy);
+ if (!opts->strategy && getenv("GIT_TEST_MERGE_ALGORITHM"))
+ opts->strategy = xstrdup(getenv("GIT_TEST_MERGE_ALGORITHM"));
if (cmd == 'q') {
int ret = sequencer_remove_state(opts);