Re: [PATCH v4 2/3] merge: Add merge.renames config setting
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 4, 2018, 03:07 UTC
- Message-ID
- <xmqqefist8xr.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180502160056.5836-3-benpeart@microsoft.com>
Ben Peart <Ben.Peart@microsoft.com> writes:
I'd downcase the verb on the subject.
Show 21 quoted lines
> 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>
> ...
> 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.