gc --aggressive: make it really aggressive
The default was not to change the window or depth at all. As suggested by Jon Smirl, Linus Torvalds and others, default to --window=250 --depth=250 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Dec 6, 2007 at 12:03 UTC
1c192f3442414a6ce83f9a524806fc26a0861d2d
1 file changed
+2
-1
builtin-gc.c
+2
-1
@@ -23,7 +23,7 @@ static const char * const builtin_gc_usage[] = {
23
};
24
25
static int pack_refs = 1;
26
-static int aggressive_window = -1;
26
+static int aggressive_window = 250;
27
static int gc_auto_threshold = 6700;
28
static int gc_auto_pack_limit = 50;
29
static const char *prune_expire = "2.weeks.ago";
@@ -200,6 +200,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
200
201
if (aggressive) {
202
append_option(argv_repack, "-f", MAX_ADD);
203
+ append_option(argv_repack, "--depth=250", MAX_ADD);
204
if (aggressive_window > 0) {
205
sprintf(buf, "--window=%d", aggressive_window);
206
append_option(argv_repack, buf, MAX_ADD);