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

Re: [PATCH] gc --auto: warn garbage collection happens soon

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Dec 28, 2011, 22:09 UTC
Message-ID
<CACsJy8BSewZuk-aoorqXRtD=nhPV=TY8YgjFj9uGMivv_GTQSA@mail.gmail.com>
In-Reply-To
<20111228213018.GA22811@sigill.intra.peff.net>
2011/12/29 Jeff King <peff@peff.net>:
Show 12 quoted lines
> Especially now that prune has learned about progress reporting, it's
> easy to see in "git gc" that the "Counting objects" phase of the repack
> and the connectivity search in prune are counting the same objects.  It
> would obviously be easy to just dump the set of sha1s in packed binary
> format, and let git-prune reference that.
>
> But it doesn't work in the general case. Running "git gc" will repack
> everything, and so it looks at all reachable objects. But "git gc
> --auto" will typically do an incremental pack (unless you have too many
> packs), which means its counting objects phase only looks at part of
> the graph.  So that result can't be used for object reachability, since
> many objects won't be marked[1].

Hmm.. I was thinking of sharing this "counting objects" part when repack is rewritten in C. I guess I can drop the idea now.

-- 
Duy
Previous: Jeff KingNext: Nguyen Thai Ngoc Duy
Message 6 of 8 in “gc --auto: warn garbage collection happens soon”
  1. gc --auto: warn garbage collection happens soonNguyễn Thái Ngọc Duy, Dec 27, 2011
  2. Junio C HamanoDec 27, 2011
  3. Jeff KingDec 28, 2011
  4. Junio C HamanoDec 28, 2011
  5. Jeff KingDec 28, 2011
  6. Nguyen Thai Ngoc DuyDec 28, 2011
  7. Nguyen Thai Ngoc DuyDec 28, 2011
  8. Mark BrownDec 29, 2011

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.