merge: make merge.renormalize work for all uses of merge machinery
The 'merge' command is not the only one that does merges; other commands like checkout -m or rebase do as well. Unfortunately, the only area of the code that checked for the "merge.renormalize" config setting was in builtin/merge.c, meaning it could only affect merges performed by the "merge" command. Move the handling of this config setting to merge_recursive_config() so that other commands can benefit from it as well. Fixes a few tests in t6038. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
6f6e7cfb52
commit
8d552258f4
@ -72,7 +72,6 @@ static const char **xopts;
|
||||
static size_t xopts_nr, xopts_alloc;
|
||||
static const char *branch;
|
||||
static char *branch_mergeoptions;
|
||||
static int option_renormalize;
|
||||
static int verbosity;
|
||||
static int allow_rerere_auto;
|
||||
static int abort_current_merge;
|
||||
@ -621,8 +620,6 @@ static int git_merge_config(const char *k, const char *v, void *cb)
|
||||
return git_config_string(&pull_octopus, k, v);
|
||||
else if (!strcmp(k, "commit.cleanup"))
|
||||
return git_config_string(&cleanup_arg, k, v);
|
||||
else if (!strcmp(k, "merge.renormalize"))
|
||||
option_renormalize = git_config_bool(k, v);
|
||||
else if (!strcmp(k, "merge.ff")) {
|
||||
int boolval = git_parse_maybe_bool(v);
|
||||
if (0 <= boolval) {
|
||||
@ -721,7 +718,6 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
|
||||
if (!strcmp(strategy, "subtree"))
|
||||
o.subtree_shift = "";
|
||||
|
||||
o.renormalize = option_renormalize;
|
||||
o.show_rename_progress =
|
||||
show_progress == -1 ? isatty(2) : show_progress;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user