Teach diff to imply --find-copies-harder upon -C -C

Earlier, a second "-C" on the command line had no effect.
But "--find-copies-harder" is so long to type, let's make doubled -C
enable that option.  It is in line with how "git blame" handles such
doubled options to mean "work harder".

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Schindelin
2007-06-11 21:12:19 +01:00
committed by Junio C Hamano
parent d52fd42acd
commit ca6c097089
2 changed files with 6 additions and 3 deletions

2
diff.c
View File

@ -2201,6 +2201,8 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
options->detect_rename = DIFF_DETECT_RENAME;
}
else if (!prefixcmp(arg, "-C")) {
if (options->detect_rename == DIFF_DETECT_COPY)
options->find_copies_harder = 1;
if ((options->rename_score =
diff_scoreopt_parse(arg)) == -1)
return -1;