summaryrefslogtreecommitdiff
path: root/merge-recursive.h
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2019-08-17 18:41:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-08-19 17:08:04 (GMT)
commit8599ab4574ce3a8b2fc894c7cfdac8fd61450b7b (patch)
tree7e1a56c1f2fab3f729c9c76d37bb3f12cc0ef16e /merge-recursive.h
parent7c0a6c8e477bd9009001590f49274e892e92fce8 (diff)
downloadgit-8599ab4574ce3a8b2fc894c7cfdac8fd61450b7b.zip
git-8599ab4574ce3a8b2fc894c7cfdac8fd61450b7b.tar.gz
git-8599ab4574ce3a8b2fc894c7cfdac8fd61450b7b.tar.bz2
merge-recursive: consolidate unnecessary fields in merge_options
We provided users with the ability to state whether they wanted rename detection, and to put a limit on how much CPU would be spent. Both of these fields had multiple configuration parameters for setting them, with one being a fallback and the other being an override. However, instead of implementing the logic for how to combine the multiple source locations into the appropriate setting at config loading time, we loaded and tracked both values and then made the code combine them every time it wanted to check the overall value. This had a few minor drawbacks: * it seems more complicated than necessary * it runs the risk of people using the independent settings in the future and breaking the intent of how the options are used together * it makes merge_options more complicated than necessary for other potential users of the API Fix these problems by moving the logic for combining the pairs of options into a single value; make it apply at time-of-config-loading instead of each-time-of-use. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.h')
-rw-r--r--merge-recursive.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/merge-recursive.h b/merge-recursive.h
index 0fdae90..f4bdfbc 100644
--- a/merge-recursive.h
+++ b/merge-recursive.h
@@ -27,10 +27,8 @@ struct merge_options {
MERGE_DIRECTORY_RENAMES_CONFLICT = 1,
MERGE_DIRECTORY_RENAMES_TRUE = 2
} detect_directory_renames;
- int diff_detect_rename;
- int merge_detect_rename;
- int diff_rename_limit;
- int merge_rename_limit;
+ int detect_renames;
+ int rename_limit;
int rename_score;
int needed_rename_limit;
int show_rename_progress;