From b8960bbe7bdfc0b232462f916ee8151c83afd16f Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 30 Apr 2008 13:25:53 -0400 Subject: diff: make "too many files" rename warning optional In many cases, the warning ends up as clutter, because the diff is being done "behind the scenes" from the user (e.g., when generating a commit diffstat), and whether we show renames or not is not particularly interesting to the user. However, in the case of a merge (which is what motivated the warning in the first place), it is a useful hint as to why a merge with renames might have failed. This patch makes the warning optional based on the code calling into diffcore. We default to not showing the warning, but turn it on for merges. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- diffcore-rename.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'diffcore-rename.c') diff --git a/diffcore-rename.c b/diffcore-rename.c index 1369a5ec45..1b2ebb4001 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; } -- cgit v1.2.3