Skip to content

Commit

Permalink
gc --aggressive: make it really aggressive
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Mar 19, 2009
1 parent ba150a3 commit 1c192f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builtin-gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static const char * const builtin_gc_usage[] = {
};

static int pack_refs = 1;
static int aggressive_window = -1;
static int aggressive_window = 250;
static int gc_auto_threshold = 6700;
static int gc_auto_pack_limit = 50;
static const char *prune_expire = "2.weeks.ago";
Expand Down Expand Up @@ -200,6 +200,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)

if (aggressive) {
append_option(argv_repack, "-f", MAX_ADD);
append_option(argv_repack, "--depth=250", MAX_ADD);
if (aggressive_window > 0) {
sprintf(buf, "--window=%d", aggressive_window);
append_option(argv_repack, buf, MAX_ADD);
Expand Down

0 comments on commit 1c192f3

Please sign in to comment.