Re: [PATCH] diff.c: respect diff.renames config option
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jul 7, 2006, 10:22 UTC
- Message-ID
- <7v7j2p3eac.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <11522670473116-git-send-email-normalperson@yhbt.net>
Eric Wong <normalperson@yhbt.net> 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.
Show 14 quoted lines
> @@ -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?