login
Header Space

 
 

[PATCH] gc --aggressive: make it really aggressive

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: Daniel Berlin <dberlin@...>, David Miller <davem@...>, <ismail@...>, <gcc@...>, <git@...>, <gitster@...>
Date: Thursday, December 6, 2007 - 8:03 am

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>
---

	On Wed, 5 Dec 2007, Linus Torvalds wrote:

	> On Thu, 6 Dec 2007, Daniel Berlin wrote:
	> > 
	> > Actually, it turns out that git-gc --aggressive does this dumb 
	> > thing to pack files sometimes regardless of whether you 
	> > converted from an SVN repo or not.
	> 
	> Absolutely. git --aggressive is mostly dumb. It's really only 
	> useful for the case of "I know I have a *really* bad pack, and I 
	> want to throw away all the bad packing decisions I have done".
	>
	> [...]
	> 
	> So the equivalent of "git gc --aggressive" - but done *properly* 
	> - is to do (overnight) something like
	> 
	> 	git repack -a -d --depth=250 --window=250

	How about this, then?
	
 builtin-gc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/builtin-gc.c b/builtin-gc.c
index 799c263..c6806d3 100644
--- a/builtin-gc.c
+++ b/builtin-gc.c
@@ -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 = 20;
 
@@ -192,6 +192,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);
-- 
1.5.3.7.2157.g9598e

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Git and GCC, David Miller, (Wed Dec 5, 10:52 pm)
Re: Git and GCC, Johannes Schindelin, (Thu Dec 6, 7:57 am)
Re: Git and GCC, Ismail , (Thu Dec 6, 8:04 am)
Re: Git and GCC, Daniel Berlin, (Wed Dec 5, 11:47 pm)
Re: Git and GCC, Harvey Harrison, (Thu Dec 6, 12:25 am)
Re: Git and GCC, Linus Torvalds, (Thu Dec 6, 12:54 am)
Re: Git and GCC, Harvey Harrison, (Thu Dec 6, 1:04 am)
Re: Git and GCC, David Miller, (Thu Dec 6, 12:20 am)
Re: Git and GCC, Daniel Berlin, (Thu Dec 6, 12:32 am)
Re: Git and GCC, David Miller, (Thu Dec 6, 12:48 am)
Re: Git and GCC, Daniel Berlin, (Thu Dec 6, 1:11 am)
Re: Git and GCC, Linus Torvalds, (Thu Dec 6, 2:09 am)
Re: Git and GCC, Jon Loeliger, (Thu Dec 6, 3:12 pm)
Re: Git and GCC, Junio C Hamano, (Thu Dec 6, 4:04 pm)
Re: Git and GCC, Junio C Hamano, (Thu Dec 6, 5:02 pm)
Re: Git and GCC, David Kastrup, (Thu Dec 6, 6:26 pm)
[OT] Re: Git and GCC, Randy Dunlap, (Thu Dec 6, 6:38 pm)
Re: Git and GCC, Linus Torvalds, (Thu Dec 6, 3:39 pm)
Re: Git and GCC, Jakub Narebski, (Thu Dec 6, 8:29 pm)
Re: Git and GCC, NightStrike, (Thu Dec 6, 2:24 pm)
Re: Git and GCC, Linus Torvalds, (Thu Dec 6, 2:45 pm)
Re: Git and GCC, NightStrike, (Fri Dec 7, 1:36 am)
Re: Git and GCC, Daniel Berlin, (Thu Dec 6, 2:04 pm)
Re: Git and GCC, Harvey Harrison, (Thu Dec 6, 10:42 pm)
Re: Git and GCC, Linus Torvalds, (Thu Dec 6, 11:01 pm)
Re: Git and GCC, Jon Smirl, (Fri Dec 7, 12:06 am)
Re: Git and GCC, Linus Torvalds, (Fri Dec 7, 1:21 am)
Re: Git and GCC, Jon Smirl, (Fri Dec 7, 3:08 am)
Re: Git and GCC, Nicolas Pitre, (Fri Dec 7, 3:36 pm)
Re: Git and GCC, Nicolas Pitre, (Fri Dec 7, 12:21 am)
Re: Git and GCC, Linus Torvalds, (Thu Dec 6, 2:29 pm)
[PATCH] gc --aggressive: make it really aggressive, Johannes Schindelin, (Thu Dec 6, 8:03 am)
Re: [PATCH] gc --aggressive: make it really aggressive, Harvey Harrison, (Thu Dec 6, 11:30 am)
Re: [PATCH] gc --aggressive: make it really aggressive, Linus Torvalds, (Thu Dec 6, 12:19 pm)
Re: [PATCH] gc --aggressive: make it really aggressive, Johannes Schindelin, (Thu Dec 6, 11:56 am)
Re: [PATCH] gc --aggressive: make it really aggressive, Pierre Habouzit, (Thu Dec 6, 10:22 am)
Re: [PATCH] gc --aggressive: make it really aggressive, Johannes Schindelin, (Thu Dec 6, 11:55 am)
Re: [PATCH] gc --aggressive: make it really aggressive, David Kastrup, (Thu Dec 6, 1:05 pm)
Re: [PATCH] gc --aggressive: make it really aggressive, Theodore Tso, (Thu Dec 6, 9:42 am)
Re: [PATCH] gc --aggressive: make it really aggressive, Nicolas Pitre, (Thu Dec 6, 10:15 am)
Re: Git and GCC, Harvey Harrison, (Thu Dec 6, 3:49 am)
Re: Git and GCC, Nicolas Pitre, (Thu Dec 6, 10:01 am)
Re: Git and GCC, David Brown, (Thu Dec 6, 4:11 am)
Re: Git and GCC, Harvey Harrison, (Thu Dec 6, 1:15 am)
Re: Git and GCC, Daniel Berlin, (Thu Dec 6, 1:17 am)
Re: Git and GCC, Jon Smirl, (Thu Dec 6, 2:47 am)
Re: Git and GCC, Jeff King, (Thu Dec 6, 3:15 am)
Re: Git and GCC, Nicolas Pitre, (Thu Dec 6, 10:18 am)
Re: Git and GCC, Jeff King, (Thu Dec 6, 1:39 pm)
Re: Git and GCC, David Miller, (Thu Dec 6, 11:31 pm)
Re: Git and GCC, Jeff King, (Fri Dec 7, 2:38 am)
Re: Git and GCC, Jon Smirl, (Fri Dec 7, 3:10 am)
Re: Git and GCC, David Miller, (Fri Dec 7, 8:53 am)
Re: Git and GCC, David Miller, (Mon Dec 10, 5:57 am)
Re: Git and GCC, Linus Torvalds, (Fri Dec 7, 1:23 pm)
Re: Git and GCC, David Miller, (Fri Dec 7, 9:55 pm)
Re: Git and GCC, Giovanni Bajo, (Fri Dec 7, 4:26 pm)
Re: Git and GCC, Jakub Narebski, (Fri Dec 7, 6:14 pm)
Re: Git and GCC, Giovanni Bajo, (Fri Dec 7, 7:14 pm)
Re: Git and GCC, Daniel Berlin, (Fri Dec 7, 7:33 pm)
Re: Git and GCC, Johannes Schindelin, (Sat Dec 8, 8:00 am)
Re: Git and GCC, Luke Lu, (Fri Dec 7, 7:04 pm)
Re: Git and GCC, Linus Torvalds, (Thu Dec 6, 2:35 pm)
Re: Git and GCC, Harvey Harrison, (Fri Dec 7, 8:47 pm)
Re: Git and GCC, Gabriel Paubert, (Mon Dec 10, 5:54 am)
Re: Git and GCC, Nicolas Pitre, (Mon Dec 10, 11:35 am)
Re: Git and GCC, Jeff King, (Fri Dec 7, 3:31 am)
Re: Git and GCC, Jon Smirl, (Thu Dec 6, 2:55 pm)
Re: Git and GCC, Nicolas Pitre, (Thu Dec 6, 3:08 pm)
Re: Git and GCC, Jon Smirl, (Thu Dec 6, 5:39 pm)
Re: Git and GCC, Nicolas Pitre, (Thu Dec 6, 6:08 pm)
Re: Git and GCC, Jon Smirl, (Thu Dec 6, 6:22 pm)
Re: Git and GCC, Nicolas Pitre, (Thu Dec 6, 6:30 pm)
Re: Git and GCC, Jon Smirl, (Thu Dec 6, 6:44 pm)
Re: Git and GCC, Jon Smirl, (Thu Dec 6, 6:11 pm)
Re: Git and GCC, Nicolas Pitre, (Thu Dec 6, 2:02 pm)
Re: Git and GCC, Jeff King, (Fri Dec 7, 2:50 am)
Re: Git and GCC, Jeff King, (Fri Dec 7, 3:27 am)
Re: Git and GCC, Harvey Harrison, (Thu Dec 6, 12:28 am)
speck-geostationary