git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Junio C HamanoNext: Roberto Tyley
Message 8 of 9 in “Blobs not referenced by file (anymore) are not removed by GC”
  1. Martin SchererDec 8, 2014
  2. Jeff KingDec 9, 2014
  3. Roberto TyleyDec 9, 2014
  4. Jeff KingDec 9, 2014
  5. Roberto TyleyDec 9, 2014
  6. Jeff KingDec 10, 2014
  7. Junio C HamanoDec 10, 2014
  8. Roberto TyleyDec 10, 2014
  9. Roberto TyleyDec 8, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.