path: root/merge-recursive.c
diff options
authorElijah Newren <>2020-08-03 18:41:19 (GMT)
committerJunio C Hamano <>2020-08-03 18:48:15 (GMT)
commit8d552258f45ba3886e8d508ece8585b509a04677 (patch)
treebc42b9dd566d13f8f3e1e8174bdd531b0d6c4275 /merge-recursive.c
parent6f6e7cfb52a07578c275656a8fd735265eca1a07 (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'merge-recursive.c')
1 files changed, 3 insertions, 0 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 36948ea..a1c8b36 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);