summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-03-19 23:23:56 -0700
committerJunio C Hamano <gitster@pobox.com>2011-03-19 23:23:56 -0700
commit0ce6a51b43815a34d0dbebaa799b32a83d1ea4f9 (patch)
tree999ed87a9453af4848bf98a3341ceaf0801c6f95 /merge-recursive.c
parentedf9d719d1d05c1eb4f652782febfdfede212648 (diff)
parentbebd2fd77d385f198017fe297a6c79e26b2bf61c (diff)
downloadgit-0ce6a51b43815a34d0dbebaa799b32a83d1ea4f9.tar.gz
Merge branch 'jk/merge-rename-ux'
* jk/merge-rename-ux: pull: propagate --progress to merge merge: enable progress reporting for rename detection add inexact rename detection progress infrastructure commit: stop setting rename limit bump rename limit defaults (again) merge: improve inexact rename limit warning
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 3debbc44a0..8e82a8b1a5 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -22,6 +22,11 @@
#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)
{
@@ -418,14 +423,16 @@ static struct string_list *get_renames(struct merge_options *o,
opts.detect_rename = DIFF_DETECT_RENAME;
opts.rename_limit = o->merge_rename_limit >= 0 ? o->merge_rename_limit :
o->diff_rename_limit >= 0 ? o->diff_rename_limit :
- 500;
+ 1000;
opts.rename_score = o->rename_score;
- opts.warn_on_too_large_rename = 1;
+ opts.show_rename_progress = o->show_rename_progress;
opts.output_format = DIFF_FORMAT_NO_OUTPUT;
if (diff_setup_done(&opts) < 0)
die("diff setup failed");
diff_tree_sha1(o_tree->object.sha1, tree->object.sha1, "", &opts);
diffcore_std(&opts);
+ if (opts.needed_rename_limit > o->needed_rename_limit)
+ o->needed_rename_limit = opts.needed_rename_limit;
for (i = 0; i < diff_queued_diff.nr; ++i) {
struct string_list_item *item;
struct rename *re;
@@ -1649,6 +1656,8 @@ 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);
return clean;
}