summaryrefslogtreecommitdiff
path: root/builtin/revert.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-11-18 21:32:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-18 21:32:53 (GMT)
commita1f95951efc55c97477e32287b06e204553be5c2 (patch)
tree65bda8319dd00e2e2bab2a2a4d77ca1e8f41944a /builtin/revert.c
parent7660da161821ab79b8ecd5019c28843ed7e770a6 (diff)
parent14c4586c2dfa94d86d71a60481dd20bc5b56e562 (diff)
downloadgit-a1f95951efc55c97477e32287b06e204553be5c2.zip
git-a1f95951efc55c97477e32287b06e204553be5c2.tar.gz
git-a1f95951efc55c97477e32287b06e204553be5c2.tar.bz2
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 da8997d..314a86c 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);