diff options
author | Elijah Newren <newren@gmail.com> | 2020-08-03 20:41:19 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-03 20:48:15 +0200 |
commit | 8d552258f45ba3886e8d508ece8585b509a04677 (patch) | |
tree | bc42b9dd566d13f8f3e1e8174bdd531b0d6c4275 /merge-recursive.c | |
parent | t6038: remove problematic test (diff) | |
download | git-8d552258f45ba3886e8d508ece8585b509a04677.tar.xz git-8d552258f45ba3886e8d508ece8585b509a04677.zip |
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>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 36948eafb7..a1c8b36ddb 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -3791,9 +3791,12 @@ int merge_recursive_generic(struct merge_options *opt, static void merge_recursive_config(struct merge_options *opt) { char *value = NULL; + int renormalize = 0; git_config_get_int("merge.verbosity", &opt->verbosity); git_config_get_int("diff.renamelimit", &opt->rename_limit); git_config_get_int("merge.renamelimit", &opt->rename_limit); + git_config_get_bool("merge.renormalize", &renormalize); + opt->renormalize = renormalize; if (!git_config_get_string("diff.renames", &value)) { opt->detect_renames = git_config_rename("diff.renames", value); free(value); |