merge: improve inexact rename limit warning

The warning is generated deep in the diffcore code, which
means that it will come first, followed possibly by a spew
of conflicts, making it hard to see.

Instead, let's have diffcore pass back the information about
how big the rename limit would needed to have been, and then
the caller can provide a more appropriate message (and at a
more appropriate time).

No refactoring of other non-merge callers is necessary,
because nobody else was even using the warn_on_rename_limit
feature.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2011-02-19 05:20:51 -05:00
committed by Junio C Hamano
parent 7ed863a85a
commit bf0ab10fa8
4 changed files with 14 additions and 4 deletions

View File

@ -20,6 +20,7 @@ struct merge_options {
int diff_rename_limit;
int merge_rename_limit;
int rename_score;
int needed_rename_limit;
int call_depth;
struct strbuf obuf;
struct string_list current_file_set;