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

Re: Seriously broken "git pack-refs"

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jan 26, 2007, 06:24 UTC
Message-ID
<Pine.LNX.4.64.0701252218540.25027@woody.linux-foundation.org>
In-Reply-To
<7vireu2uc6.fsf@assigned-by-dhcp.cox.net>
On Thu, 25 Jan 2007, Junio C Hamano wrote:
> 
> On the other hand, I do not think it is worth unpacking non-tags
> that are packed when --all is not given, so...
Exactly. 
I'd much rather have
	git pack-refs --all --prune
just pack everything once and for all. Afterwards, if you do just
	git pack-refs

it will keep everything that was packed packed, and any loose refs (which might be loose because they are new, but perhaps because they simply got overridden by being changed) will not be added to the pack unless they are tags.

Which should be the semantics with my patch applied. 

The above actually makes tons of sense: operations like big imports (or clones) might want to start out with *everything* packed, but then as we update, commit and modify, what we actually want to do is to basically let the branches that are actively developed "become unpacked" as they are updated.

So the "repack refs that were already packed, or refs that are tags" is actually a very sane default. It's not just that we don't want to lose the refs entirely, it's also that what we actually want to do by default is to pack the stuff we have reason to believe won't be actively changing.

Tags automatically fall under that heading (which is why it makes sense to pack them by default in the first place!) but so does any ref that was already packed, and hadn't become unpacked since the last repack. By definition, such a ref isn't "actively changing" even if it isn't a tag.

No?
		Linus
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 6 in “Seriously broken "git pack-refs"”
  1. Linus TorvaldsJan 26, 2007
  2. Junio C HamanoJan 26, 2007
  3. Linus TorvaldsJan 26, 2007
  4. Junio C HamanoJan 26, 2007
  5. Linus TorvaldsJan 26, 2007
  6. Junio C HamanoJan 26, 2007

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.