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

Re: A look at some alternative PACK file encodings

From
Shawn Pearce <spearce@spearce.org>
Date
Sep 7, 2006, 05:41 UTC
Message-ID
<20060907054126.GC31580@spearce.org>
In-Reply-To
<9e4733910609061704s429c449etcf0475841556c26b@mail.gmail.com>
Jon Smirl <jonsmirl@gmail.com> wrote:
> The repack code could build a model of the tree as it is repacking,
> that is what fast-import does. If you have a model of the tree then
> when you change a TREE node you track the last sha1 that corresponded
> to that directory path. Now you know what to diff to.

Right. But that's horribly expensive. For the most part pack-objects does a good job estimating this by hashing the trees by their name and size into the same hash bucket. And its fast.

Besides its better to store reverse deltas (like what CVS does) as faster access to the more recent stuff is more interesting than faster access to the older stuff. pack-objects tries to do this based on the order given by rev-list.

-- 
Shawn.
Previous: Jon SmirlNext: Shawn Pearce
Message 11 of 24 in “A look at some alternative PACK file encodings”
  1. A Large Angry SCMSep 6, 2006
  2. Jon SmirlSep 6, 2006
  3. A Large Angry SCMSep 6, 2006
  4. Linus TorvaldsSep 6, 2006
  5. Jon SmirlSep 7, 2006
  6. David LangSep 7, 2006
  7. A Large Angry SCMSep 7, 2006
  8. Linus TorvaldsSep 7, 2006
  9. Nicolas PitreSep 7, 2006
  10. Jon SmirlSep 7, 2006
  11. Shawn PearceSep 7, 2006
  12. Shawn PearceSep 7, 2006
  13. Nicolas PitreSep 7, 2006
  14. Jon SmirlSep 7, 2006
  15. Nicolas PitreSep 7, 2006
  16. A Large Angry SCMSep 7, 2006
  17. Junio C HamanoSep 7, 2006
  18. Nicolas PitreSep 7, 2006
  19. Shawn PearceSep 7, 2006
  20. Junio C HamanoSep 7, 2006
  21. Shawn PearceSep 7, 2006
  22. Junio C HamanoSep 7, 2006
  23. Shawn PearceSep 7, 2006
  24. A Large Angry SCMSep 7, 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.