Git development
 help / color / mirror / Atom feed
* [PATCH] Documentation/git-gc.txt: change --aggressive description
@ 2008-05-13  9:53 Pieter de Bie
  2008-05-13 10:57 ` Teemu Likonen
  2008-05-13 11:52 ` Johannes Schindelin
  0 siblings, 2 replies; 10+ messages in thread
From: Pieter de Bie @ 2008-05-13  9:53 UTC (permalink / raw)
  To: git; +Cc: Pieter de Bie

The documentation for the --aggressive flag was misleading, hinting that
running git gc with --aggressive is a good thing. However, --aggressive only
really makes sense if you have a bad pack file, such as from git-fast-import.
---

I keep seeing people regularly packing their repo with git gc --aggressive.
However, in my experience, this seldom results in a smaller repository. This
can be because the repository was repacked tightly previously (for example,
with a high --window value) or because incremental "git gc" just makes better
packs anyway. Throwing away that information is often not a good idea.

The documentation for the --aggressive flag was misleading, in that it hints that you'll get a smaller pack, which is often not the case.



 Documentation/git-gc.txt |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index b6b5ce1..ebf972c 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -36,9 +36,11 @@ OPTIONS
 	Usually 'git-gc' runs very quickly while providing good disk
 	space utilization and performance.  This option will cause
 	git-gc to more aggressively optimize the repository at the expense
-	of taking much more time.  The effects of this optimization are
-	persistent, so this option only needs to be used occasionally; every
-	few hundred changesets or so.
+	of taking much more time. Note that this will throw away all previous
+	optimizations. As a result, running git gc with --aggressive will not
+	necessarily create a smaller pack file, especially when the repository was
+	packed tightly already. Using --aggressive only makes sense if you have a
+	badly packed repository, such as created by git-fast-import.
 
 --auto::
 	With this option, `git gc` checks whether any housekeeping is
-- 
1.5.5.1.174.g32fa0.dirty

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-05-24 19:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-13  9:53 [PATCH] Documentation/git-gc.txt: change --aggressive description Pieter de Bie
2008-05-13 10:57 ` Teemu Likonen
2008-05-13 11:08   ` Teemu Likonen
2008-05-13 11:53     ` Johannes Schindelin
2008-05-13 15:03       ` Teemu Likonen
2008-05-13 11:13   ` Pieter de Bie
2008-05-13 11:52 ` Johannes Schindelin
2008-05-14  6:48   ` Pieter de Bie
2008-05-14  7:48     ` Matthieu Moy
2008-05-24 19:03     ` Pieter de Bie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox