Thread (1 message) 1 message, 1 author, 2018-05-04

Re: [PATCH v4 2/3] merge: Add merge.renames config setting

From: Junio C Hamano <hidden>
Date: 2018-05-04 03:07:50

Ben Peart [off-list ref] writes:

I'd downcase the verb on the subject.
quoted hunk
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 <redacted>
Helped-by: Elijah Newren [off-list ref]
Signed-off-by: Ben Peart <redacted>
...
diff --git a/merge-recursive.h b/merge-recursive.h
index d863cf8867..c1d9b5b3d9 100644
--- a/merge-recursive.h
+++ b/merge-recursive.h
@@ -55,6 +56,11 @@ struct collision_entry {
 	struct string_list source_files;
 	unsigned reported_already:1;
 };
+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;
+}
I'll tweak the above to leave a blank before the function, and make
it "static inline", to ensure that the output from

    $ git grep -e '\<inline\>' --and --not -e 'static inline' -- \*.h

is empty.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help