summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-06-11 20:12:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-06-12 08:00:38 (GMT)
commitca6c097089a38d447de0190ea61e9746a40a170c (patch)
tree35a7d95350169c51c05333940014a919608352a1 /diff.c
parentd52fd42acd77613970dc8eef2c589fff6cc1e330 (diff)
downloadgit-ca6c097089a38d447de0190ea61e9746a40a170c.zip
git-ca6c097089a38d447de0190ea61e9746a40a170c.tar.gz
git-ca6c097089a38d447de0190ea61e9746a40a170c.tar.bz2
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>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index 1d234d3..4aa9bbc 100644
--- a/diff.c
+++ b/diff.c
@@ -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;