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, 19:46 UTC
Message-ID
<452BF8B3.5090305@tromer.org>
In-Reply-To
<Pine.LNX.4.64.0610100800490.3952@g5.osdl.org>
On 2006-10-10 17:03, Linus Torvalds wrote:
Show 7 quoted lines
> On Tue, 10 Oct 2006, Sam Vilain wrote:
>> If using git-repack -a, unreferenced objects are kept behind in the
>> pack.  This might be the best default, but there are no good ways
>> to clean up the packfiles if a lot of rebasing is happening, or
>> branches have been deleted.
> 
> Don't do this.

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.

Show 6 quoted lines
> I understand why you want to do it, but the fact is, it's dangerous.
> 
> Right now, "git repack" is actually safe to run even on a repository which 
> is being modified! And that's actually important, if you have something 
> like a shared repo that gets re-packed every once in a while from a 
> cron-job!

Don't run it on a shared repo, then. And grab a coffee while it runs. But why force leaf repositories to accumulate garbage?

This functionality is just as racy, and just as necessary, as "git-prune". It merely garbage-collects the packs as well. Git seems to collect unreferenced objects faster than the space between the cushions in my sofa, and there ought to be a way to tidy up things.

Linus, I see why you neither need nor want this functionality in your typical workflow, but things look different for a downstream developer who engages in a variety of garbage-generating activities like tracking wild trees, rebasing patches and using stgit. I really don't need that unreferenced copy of 2.6.15-rc2-mm1 in my packs anymore.

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