bump rename limit defaults
The current rename limit default of 100 was arbitrarily chosen. Testing[1] has shown that on modern hardware, a limit of 200 adds about a second of computation time, and a limit of 500 adds about 5 seconds of computation time. This patch bumps the default limit to 200 for viewing diffs, and to 500 for performing a merge. The limit for generating git-status templates is set independently; we bump it up to 200 here, as well, to match the diff limit. [1]: See <20080211113516.GB6344@coredump.intra.peff.net> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Apr 30, 2008 at 13:24 UTC
50705915eae89eae490dff30fa370ed02e4d6e72
3 files changed
+3
-3
builtin-merge-recursive.c
+1
-1
@@ -364,7 +364,7 @@ static struct path_list *get_renames(struct tree *tree,
364
opts.detect_rename = DIFF_DETECT_RENAME;
365
opts.rename_limit = merge_rename_limit >= 0 ? merge_rename_limit :
366
diff_rename_limit >= 0 ? diff_rename_limit :
367
- 100;
367
+ 500;
368
opts.output_format = DIFF_FORMAT_NO_OUTPUT;
369
if (diff_setup_done(&opts) < 0)
370
die("diff setup failed");
diff.c
+1
-1
@@ -19,7 +19,7 @@
19
#endif
20
21
static int diff_detect_rename_default;
22
-static int diff_rename_limit_default = 100;
22
+static int diff_rename_limit_default = 200;
23
int diff_use_color_default = -1;
24
static const char *external_diff_cmd_cfg;
25
int diff_auto_refresh_index = 1;
wt-status.c
+1
-1
@@ -206,7 +206,7 @@ static void wt_status_print_updated(struct wt_status *s)
206
rev.diffopt.format_callback = wt_status_print_updated_cb;
207
rev.diffopt.format_callback_data = s;
208
rev.diffopt.detect_rename = 1;
209
- rev.diffopt.rename_limit = 100;
209
+ rev.diffopt.rename_limit = 200;
210
rev.diffopt.break_opt = 0;
211
run_diff_index(&rev, 1);
212
}