@matheusbsbs / matheus-bagliano / commits / 92c57e5c1d
Fork 0

bump rename limit defaults (again)

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>

Jeff King committed Feb 19, 2011 at 05:21 UTC 92c57e5c1d29db96a927e2a713c5aa4ae99ce749
2 files changed +2 -2
diff.c
+1 -1
@@ -23,7 +23,7 @@
23 #endif
24
25 static int diff_detect_rename_default;
26 -static int diff_rename_limit_default = 200;
26 +static int diff_rename_limit_default = 400;
27 static int diff_suppress_blank_empty;
28 int diff_use_color_default = -1;
29 static const char *diff_word_regex_cfg;
merge-recursive.c
+1 -1
@@ -439,7 +439,7 @@ static struct string_list *get_renames(struct merge_options *o,
439 opts.detect_rename = DIFF_DETECT_RENAME;
440 opts.rename_limit = o->merge_rename_limit >= 0 ? o->merge_rename_limit :
441 o->diff_rename_limit >= 0 ? o->diff_rename_limit :
442 - 500;
442 + 1000;
443 opts.rename_score = o->rename_score;
444 opts.output_format = DIFF_FORMAT_NO_OUTPUT;
445 if (diff_setup_done(&opts) < 0)