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
Jeff King <peff@peff.net>
Date
Dec 9, 2014, 16:11 UTC
Message-ID
<20141209161133.GA17756@peff.net>
In-Reply-To
<CAFY1edaEG040jnfTJA4G9a0bAkFJHc3N5sHjtwOOdXmndsu9YQ@mail.gmail.com>
On Tue, Dec 09, 2014 at 04:01:50PM +0000, Roberto Tyley wrote:
Show 10 quoted lines
> > 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 explaining; that information may come in handy.

I actually think filter-branch's "refs/original" is a bit outdated at this point. The information is there in the reflogs already, and dealing with refs/original often causes confusion in my experience. It could probably use a "git filter-branch --restore" or something to switch each $ref to $ref@{1} (after making sure that the reflog entry was from filter-branch, of course).

Not that I expect you to want to work on filter-branch. :) But maybe food for thought for a BFG feature.

-Peff
Previous: Roberto TyleyNext: Roberto Tyley
Message 4 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.