aboutsummaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-01-06 13:50:06 -0800
committerJunio C Hamano <gitster@pobox.com>2011-03-22 14:29:07 -0700
commitf31027c99cb2ec4eb7ad8d1ebc7f0e20fef4bd1d (patch)
treeecc4d0213fcbd8c270b254cec1caff867034ac7d /merge-recursive.c
parente88d6bc6f90059f6e87f6d51eba83ec15e4eecc9 (diff)
downloadgit-f31027c99cb2ec4eb7ad8d1ebc7f0e20fef4bd1d.tar.gz
git-f31027c99cb2ec4eb7ad8d1ebc7f0e20fef4bd1d.tar.xz
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>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 8e82a8b1a..3ae4d53cc 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -22,11 +22,6 @@
#include "dir.h"
#include "submodule.h"
-static const char rename_limit_advice[] =
-"inexact rename detection was skipped because there were too many\n"
-" files. You may want to set your merge.renamelimit variable to at least\n"
-" %d and retry this merge.";
-
static struct tree *shift_tree_object(struct tree *one, struct tree *two,
const char *subtree_shift)
{
@@ -1656,8 +1651,9 @@ int merge_recursive(struct merge_options *o,
commit_list_insert(h2, &(*result)->parents->next);
}
flush_output(o);
- if (o->needed_rename_limit)
- warning(rename_limit_advice, o->needed_rename_limit);
+ if (show(o, 2))
+ diff_warn_rename_limit("merge.renamelimit",
+ o->needed_rename_limit, 0);
return clean;
}