Re: [PATCH] Add --aggressive option to 'git gc'
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:09
Theodore Tso [off-list ref] writes:
On Wed, May 09, 2007 at 01:15:07AM -0700, Junio C Hamano wrote:quoted
quoted
Maybe git-gc should have an option for "compress hard"? It seems to me like a two-sizes-fit-all solution would be good here; "git gc" for daily use, and "git gc --squeeze" for when you want to make the result as small as possible, with compute time not being a major factor.I think that sounds saner and more user friendly than specific knob to tune "window", "depth" and friends which are too technical. It has an added attraction that we can redefine what exactly "hard" means later.OK, here's a patch that does exactly that. I choose git-gc --aggressive, since I thought that was more descriptive than --hard or --squeeze. Junio, would you be willing to apply this?
Willing? Yes. It's tricky that it defaults to 10 and still called aggressive. When the configuration variable is left unspecified, the only reason it is called aggressive is because it passes '-f' to repack, right? It was not very clear at the first sight and I was about to ask why the default is 10, not higher.