Skip to content

Commit 1c192f3

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ba150a3 commit 1c192f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin-gc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static const char * const builtin_gc_usage[] = {
2323
};
2424

2525
static int pack_refs = 1;
26-
static int aggressive_window = -1;
26+
static int aggressive_window = 250;
2727
static int gc_auto_threshold = 6700;
2828
static int gc_auto_pack_limit = 50;
2929
static const char *prune_expire = "2.weeks.ago";
@@ -200,6 +200,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
200200

201201
if (aggressive) {
202202
append_option(argv_repack, "-f", MAX_ADD);
203+
append_option(argv_repack, "--depth=250", MAX_ADD);
203204
if (aggressive_window > 0) {
204205
sprintf(buf, "--window=%d", aggressive_window);
205206
append_option(argv_repack, buf, MAX_ADD);

0 commit comments

Comments
 (0)