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

Re: [RFC/PATCH] Add a --nosort option to pack-objects

From
Nicolas Pitre <nico@cam.org>
Date
Dec 7, 2007, 22:20 UTC
Message-ID
<alpine.LFD.0.99999.0712071707250.555@xanadu.home>
In-Reply-To
<20071207214627.GB13170@glandium.org>
On Fri, 7 Dec 2007, Mike Hommey wrote:
> As you can seen from my other message, I'm *actually* not sure this is
> really material for git as a VCS. I will add documentation unrelated to
> --nosort to pack-objects anyways.
Well, I have serious doubts about this patch in the first place.
I think it is simply unneeded.

If you want pack-objects not to change the sort order because you have some sorting of your own, externally implemented, then you simply have to run git-pack-objects feeding it the list of object SHA1s along with a tag of your own which will effectively impose the sorting you want, based on that tag.

Objects with the same tag will still be sorted amongst themselves which is still a good thing.

for example, you may have something like:
	git rev-list --all --objects |
	sed -e 's|foo/logs/.*|LOGS|' |
	git pack-objects ...

This will effectively cluster all foo/logs/* files together for delta compression regardless of their actual name. Maybe that's what you really want?

Nicolas
Previous: Mike HommeyNext: Mike Hommey
Message 7 of 8 in “Add a --nosort option to pack-objects”
  1. Add a --nosort option to pack-objectsMike Hommey, Dec 7, 2007
  2. Nicolas PitreDec 7, 2007
  3. Mike HommeyDec 7, 2007
  4. Junio C HamanoDec 7, 2007
  5. Junio C HamanoDec 7, 2007
  6. Mike HommeyDec 7, 2007
  7. Nicolas PitreDec 7, 2007
  8. Mike HommeyDec 8, 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.