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 9, 2014, 16:01 UTC
Message-ID
<CAFY1edaEG040jnfTJA4G9a0bAkFJHc3N5sHjtwOOdXmndsu9YQ@mail.gmail.com>
In-Reply-To
<20141209141457.GA18544@peff.net>
On 9 December 2014 at 14:14, Jeff King <peff@peff.net> wrote:
Show 14 quoted lines
> On Mon, Dec 08, 2014 at 05:22:23PM +0100, Martin Scherer wrote:
>
>> # invoke bfg --delete-folders something multiple times with different
>> pattern.
>>
>> # try to cleanup
>>
>> git gc --aggressive --prune=now # big blobs still in history
>> git fsck # no results
>> git fsck --full  --unreachable --dangling # no results
>
> Might you still have reflogs pointing to the objects? Try:
>
>   git reflog expire --expire-unreachable=now --all
Yeah, we figured that's what it was!
https://github.com/rtyley/bfg-repo-cleaner/issues/62#issuecomment-66152559
> I also don't know if BFG keeps backup refs around (filter-branch, for
> example, writes a copy of the original refs into refs/original; you
> would want to delete that if you're trying to slim down the repo).

The BFG reports the ref changes to the command line (and outputs a full list of changed object-ids in repo-name.git.bfg-report/[datetime]/object-id-map.old-new.txt) but doesn't keep refs (like refs/original) around because that would get in the way of the BFG's explicit intended use-case of removing unwanted data.

Thanks for the object-size checking scripts, very useful.
Roberto
Previous: Jeff KingNext: Jeff King
Message 3 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.