]> Pileus Git - ~andy/git/commitdiff
bump rename limit defaults (again)
authorJeff King <peff@peff.net>
Sat, 19 Feb 2011 10:21:28 +0000 (05:21 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Feb 2011 18:23:36 +0000 (10:23 -0800)
We did this once before in 5070591 (bump rename limit
defaults, 2008-04-30). Back then, we were shooting for about
1 second for a diff/log calculation, and 5 seconds for a
merge.

There are a few new things to consider, though:

  1. Average processors are faster now.

  2. We've seen on the mailing list some ugly merges where
     not using inexact rename detection leads to many more
     conflicts. Merges of this size take a long time
     anyway, so users are probably happy to spend a little
     bit of time computing the renames.

Let's bump the diff/merge default limits from 200/500 to
400/1000. Those are 2 seconds and 10 seconds respectively on
my modern hardware.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
merge-recursive.c

diff --git a/diff.c b/diff.c
index 5422c438826254f36d1e00af0e8b882690661276..869cca7536625976e958c48b3c04d1f4bfdcacbb 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -23,7 +23,7 @@
 #endif
 
 static int diff_detect_rename_default;
-static int diff_rename_limit_default = 200;
+static int diff_rename_limit_default = 400;
 static int diff_suppress_blank_empty;
 int diff_use_color_default = -1;
 static const char *diff_word_regex_cfg;
index 2ecd456c28e435572916c304d432dc4dd2ca12c2..089aa10cc1df7e8ad129471ed1b027843d057800 100644 (file)
@@ -439,7 +439,7 @@ 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.output_format = DIFF_FORMAT_NO_OUTPUT;
        if (diff_setup_done(&opts) < 0)