aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-merge-recursive.c1
-rw-r--r--diff.h1
-rw-r--r--diffcore-rename.c3
3 files changed, 4 insertions, 1 deletions
diff --git a/builtin-merge-recursive.c b/builtin-merge-recursive.c
index 3902e9106..46e636fdc 100644
--- a/builtin-merge-recursive.c
+++ b/builtin-merge-recursive.c
@@ -365,6 +365,7 @@ static struct path_list *get_renames(struct tree *tree,
opts.rename_limit = merge_rename_limit >= 0 ? merge_rename_limit :
diff_rename_limit >= 0 ? diff_rename_limit :
500;
+ opts.warn_on_too_large_rename = 1;
opts.output_format = DIFF_FORMAT_NO_OUTPUT;
if (diff_setup_done(&opts) < 0)
die("diff setup failed");
diff --git a/diff.h b/diff.h
index f2c77391a..893111606 100644
--- a/diff.h
+++ b/diff.h
@@ -83,6 +83,7 @@ struct diff_options {
int pickaxe_opts;
int rename_score;
int rename_limit;
+ int warn_on_too_large_rename;
int dirstat_percent;
int setup;
int abbrev;
diff --git a/diffcore-rename.c b/diffcore-rename.c
index 1369a5ec4..1b2ebb400 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -492,7 +492,8 @@ void diffcore_rename(struct diff_options *options)
rename_limit = 32767;
if ((num_create > rename_limit && num_src > rename_limit) ||
(num_create * num_src > rename_limit * rename_limit)) {
- warning("too many files, skipping inexact rename detection");
+ if (options->warn_on_too_large_rename)
+ warning("too many files, skipping inexact rename detection");
goto cleanup;
}