summaryrefslogtreecommitdiff
path: root/merge-recursive.h
diff options
context:
space:
mode:
authorLibravatar Ben Peart <Ben.Peart@microsoft.com>2018-05-02 16:01:14 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-05-08 16:19:41 +0900
commit85b460305ce7ed399c83499851f46c4f870ce280 (patch)
treed56e1f9c1c1ab077050a6332365868e39ce5a485 /merge-recursive.h
parentmerge: update documentation for {merge,diff}.renameLimit (diff)
downloadtgif-85b460305ce7ed399c83499851f46c4f870ce280.tar.xz
merge: add merge.renames config setting
Add the ability to control rename detection for merge via a config setting. This setting behaves the same and defaults to the value of diff.renames but only applies to merge. Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de> Helped-by: Elijah Newren <newren@gmail.com> Signed-off-by: Ben Peart <benpeart@microsoft.com> Reviewed-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.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/merge-recursive.h b/merge-recursive.h
index 248093e407..fa7bc6b683 100644
--- a/merge-recursive.h
+++ b/merge-recursive.h
@@ -18,7 +18,8 @@ struct merge_options {
unsigned renormalize : 1;
long xdl_opts;
int verbosity;
- int detect_rename;
+ int diff_detect_rename;
+ int merge_detect_rename;
int diff_rename_limit;
int merge_rename_limit;
int rename_score;
@@ -57,6 +58,12 @@ struct collision_entry {
unsigned reported_already:1;
};
+static inline int merge_detect_rename(struct merge_options *o)
+{
+ return o->merge_detect_rename >= 0 ? o->merge_detect_rename :
+ o->diff_detect_rename >= 0 ? o->diff_detect_rename : 1;
+}
+
/* merge_trees() but with recursive ancestor consolidation */
int merge_recursive(struct merge_options *o,
struct commit *h1,