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

Re: [PATCH] repack: allow simultaneous packing and pruning

From
Linus Torvalds <torvalds@osdl.org>
Date
Oct 10, 2006, 22:27 UTC
Message-ID
<Pine.LNX.4.64.0610101524050.3952@g5.osdl.org>
In-Reply-To
<452C19FC.7030001@tromer.org>
On Wed, 11 Oct 2006, Eran Tromer wrote:
> 
> How so? This process loses the unreferenced objects from the old packs,
> where "referenced" is determined in a racy way. Same problem.
No.

Those unreferenced objects are old history that won't be part of any new history.

If you create new history, they won't be in the pack.

It's obviously possible that you create new history that has a blob that is equal to some old history (and no loose object will be created), but by then we're _really_ reaching.

> But "git prune" does not GC packs, only loose objects.

Right. And you'd want to repack _and_ prune, but they should be kept separate, because one is safe, the other is not.

Of course, if the code were to check that no references have changed over the operation, then I wouldn't have any objections.

		Linus
Previous: Eran TromerNext: Eran Tromer
Message 7 of 9 in “repack: allow simultaneous packing and pruning”
  1. repack: allow simultaneous packing and pruningSam Vilain, Oct 10, 2006
  2. Sam VilainOct 10, 2006
  3. Linus TorvaldsOct 10, 2006
  4. Eran TromerOct 10, 2006
  5. Linus TorvaldsOct 10, 2006
  6. Eran TromerOct 10, 2006
  7. Linus TorvaldsOct 10, 2006
  8. Eran TromerOct 10, 2006
  9. Junio C HamanoOct 10, 2006

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.