diffcore-rename: fall back to -C when -C -C busts the rename limit

When there are too many paths in the project, the number of rename source
candidates "git diff -C -C" finds will exceed the rename detection limit,
and no inexact rename detection is performed.  We however could fall back
to "git diff -C" if the number of modified paths is sufficiently small.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2011-01-06 13:50:06 -08:00
parent e88d6bc6f9
commit f31027c99c
7 changed files with 112 additions and 10 deletions

2
diff.h
View File

@ -111,6 +111,7 @@ struct diff_options {
int rename_score;
int rename_limit;
int needed_rename_limit;
int degraded_cc_to_c;
int show_rename_progress;
int dirstat_percent;
int setup;
@ -273,6 +274,7 @@ extern void diffcore_fix_diff_index(struct diff_options *);
extern int diff_queue_is_empty(void);
extern void diff_flush(struct diff_options*);
extern void diff_warn_rename_limit(const char *varname, int needed, int degraded_cc);
/* diff-raw status letters */
#define DIFF_STATUS_ADDED 'A'