Subject: Re: notify alternative to auto gc?

From: Sam Vilain <[email-masked]>
Date: Wed, 30 Jun 2010 14:27:18 +1200

On Mon, 2010-06-28 at 16:26 +0000, Ævar Arnfjörð Bjarmason wrote:
> On Mon, Jun 28, 2010 at 16:10, Karl Stenerud <[email-masked]> wrote:
> > The git help tells me I can disable it by setting gc.auto to 0, while the mailing list archive tells me I also have to set gc.autopacklimit to 0.  This is fine, but if I do that, I won't know when the repo is in need of cleanup.  Is there any option I can set to instruct it to simply TELL me when it's in need of gc?
> 
> Anything that tells you whether you need to gc would incur much of the
> speed penalty that running gc itself does.

See builtin/gc.c:too_many_loose_objects

Checking that gc is required involves opening one directory (objects/17
IIRC), reading all of the entries in it and counting them.  It really
doesn't hurt.

Sam