Re: git gc --auto yelling at users where a repo legitimately has >6700 loose objects
- From
Jeff King <peff@peff.net>
- Date
- Jan 12, 2018, 13:46 UTC
- Message-ID
- <20180112134609.GB7880@sigill.intra.peff.net>
- In-Reply-To
- <87inc89j38.fsf@evledraar.gmail.com>
On Thu, Jan 11, 2018 at 10:33:15PM +0100, Ævar Arnfjörð Bjarmason wrote:
Show 8 quoted lines
> 4. At the end of all this, we check *again* if we have >6700 objects, > if we do we print "run 'git prune'" to .git/gc.log, and will just > emit that error for the next day before trying again, at which point > we unlink the gc.log and retry, see gc.logExpiry. > > Right now I've just worked around this by setting gc.pruneExpire to a > lower value (4.days.ago). But there's a larger issue to be addressed > here, and I'm not sure how.
IMHO the right solution is to stop exploding loose objects, and instead write them all into a "cruft" pack. That's more efficient, to boot (since it doesn't waste inodes, and may even retain deltas between cruft objects).
But there are some tricks around timestamps. I wrote up some thoughts in:
https://public-inbox.org/git/20170610080626.sjujpmgkli4muh7h@sigill.intra.peff.net/
and downthread from there.
-Peff