Re: Blobs not referenced by file (anymore) are not removed by GC
- From
Roberto Tyley <roberto.tyley@gmail.com>
- Date
- Dec 10, 2014, 23:41 UTC
- Message-ID
- <CAFY1eda6LyZ3z-Uu2AQpqeeCpc9mn_JXwB1+TRLkyGsG+GQzPQ@mail.gmail.com>
- In-Reply-To
- <xmqqbnnbjxoy.fsf@gitster.dls.corp.google.com>
On 10 December 2014 at 16:07, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> Jeff King <peff@peff.net> writes: >>> git reflog expire --expire=now --all && git gc --prune=now --aggressive >>> >>> Maybe: >>> >>> git gc --purge >> >> Yeah, that is common enough that it might be worthwhile (you probably >> want --expire-unreachable in the reflog invocation, though). > > Also you would not want an unconditional --aggressive.
After a big rewrite deleting files the re-optimisation of --aggressive can make a big difference to packsize - for instance 1.2GB to 768MB in a test I just ran - but of course it is *much* slower, so I suspect you're right about not including it.
I wasn't aware of the '--expire-unreachable=all' switch, though it seems like a 'milder' version of the '--expire=now' switch? - in that it would keep reflog entries if they haven't been changed, which is fair enough and compatible with the 'purge' goal.