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

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

From
ETEran Tromer <git2eran@tromer.org>
Date
Oct 10, 2006, 22:09 UTC
Message-ID
<452C19FC.7030001@tromer.org>
In-Reply-To
<Pine.LNX.4.64.0610101423561.3952@g5.osdl.org>
On 2006-10-10 23:25, Linus Torvalds wrote:
Show 8 quoted lines
> On Tue, 10 Oct 2006, Eran Tromer wrote:
>> Too late: "git repack -a -d" already does it, in contradiction to its 
>> manpage. It creates a new pack by following .git/refs, and then deletes 
>> all old pack files.
> 
> That's very different.
> 
> That just means that you should not try to do two _concurrent_ repacks. 

How so? This process loses the unreferenced objects from the old packs, where "referenced" is determined in a racy way. Same problem.

Show 8 quoted lines
> 
>> Don't run it on a shared repo, then. And grab a coffee while it runs.
>> But why force leaf repositories to accumulate garbage?
> 
> Nobody forces that.
> 
> You can run "git prune" if you want to. But at least we know that "git 
> prune" is unsafe.
But "git prune" does not GC packs, only loose objects.

Anyway, I think the right thing to do is to make "git repack -a -d" operate safely (not drop any objects), and add a new --prune option so that "git repack -a -d --prune" does what "git repack -a -d" used to do.

  Eran
Previous: Linus TorvaldsNext: Linus Torvalds
Message 6 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.