Re: [PATCH v2] merge-recursive: option to disable renames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Felipe Gonçalves Assis"  <felipeg.assis@xxxxxxxxx> writes:

> @@ -482,10 +482,13 @@ static struct string_list *get_renames(struct merge_options *o,
>  	struct diff_options opts;
>  
>  	renames = xcalloc(1, sizeof(struct string_list));
> +	if (!o->detect_rename)
> +		return renames;
> +
>  	diff_setup(&opts);
>  	DIFF_OPT_SET(&opts, RECURSIVE);
>  	DIFF_OPT_CLR(&opts, RENAME_EMPTY);
> -	opts.detect_rename = DIFF_DETECT_RENAME;
> +	opts.detect_rename = o->detect_rename;
>  	opts.rename_limit = o->merge_rename_limit >= 0 ? o->merge_rename_limit :
>  			    o->diff_rename_limit >= 0 ? o->diff_rename_limit :
>  			    1000;

I do not think you want the latter change.  Also o->detect_rename
should be just a simple boolean and it is better not to link its
value with DIFF_ANYTHING symbol.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]