summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2a2ac92)
raw | patch | inline | side by side (parent: 2a2ac92)
author | Jeff King <peff@peff.net> | |
Wed, 30 Apr 2008 17:24:43 +0000 (13:24 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 3 May 2008 20:39:53 +0000 (13:39 -0700) |
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>
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>
builtin-merge-recursive.c | patch | blob | history | |
diff.c | patch | blob | history | |
wt-status.c | patch | blob | history |
index 1293e3d342de89b6a8fe81c54a1abd16418acba8..3902e910694e00dead5154ad8dfe8c1f231e20a2 100644 (file)
opts.detect_rename = DIFF_DETECT_RENAME;
opts.rename_limit = merge_rename_limit >= 0 ? merge_rename_limit :
diff_rename_limit >= 0 ? diff_rename_limit :
- 100;
+ 500;
opts.output_format = DIFF_FORMAT_NO_OUTPUT;
if (diff_setup_done(&opts) < 0)
die("diff setup failed");
index 3632b552b2eae5bda3cdec3323f3a68907c6f09a..f7355191dde978c057ca0c56fc1aa98db4ebcc02 100644 (file)
--- a/diff.c
+++ b/diff.c
#endif
static int diff_detect_rename_default;
-static int diff_rename_limit_default = 100;
+static int diff_rename_limit_default = 200;
int diff_use_color_default = -1;
static const char *external_diff_cmd_cfg;
int diff_auto_refresh_index = 1;
diff --git a/wt-status.c b/wt-status.c
index 532b4ea2c1960f18e41a5167a60f6de1b481606b..a44c5433754eb89cb84a64c7c7c6d2181bcf7641 100644 (file)
--- a/wt-status.c
+++ b/wt-status.c
rev.diffopt.format_callback = wt_status_print_updated_cb;
rev.diffopt.format_callback_data = s;
rev.diffopt.detect_rename = 1;
- rev.diffopt.rename_limit = 100;
+ rev.diffopt.rename_limit = 200;
rev.diffopt.break_opt = 0;
run_diff_index(&rev, 1);
}