Re: [PATCH] diff.c: respect diff.renames config option

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

 



Eric Wong <normalperson@xxxxxxxx> writes:

> diff.renames is mentioned several times in the documentation,
> but to my surprise it didn't do anything before this patch.

I am really reluctant to do this at this low-level, especially
since there is no way to defeat the settings from the command
line.

> @@ -120,6 +121,16 @@ int git_diff_config(const char *var, con
>  			diff_use_color_default = git_config_bool(var, value);
>  		return 0;
>  	}
> +	if (!strcmp(var, "diff.renames")) {
> +		if (!value)
> +			diff_detect_rename_default = DIFF_DETECT_RENAME;
> +		else if (!strcasecmp(value, "copies") ||
> +			 !strcasecmp(value, "copy"))
> +			diff_detect_rename_default = DIFF_DETECT_COPY;
> +		else
> +			diff_detect_rename_default = git_config_bool(var,value);
> +		return 0;
> +	}

I suspect this works only because DIFF_DETECT_RENAME happens to
be 1?

-
: 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]