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

Re: A look at some alternative PACK file encodings

From
Nicolas Pitre <nico@cam.org>
Date
Sep 7, 2006, 02:47 UTC
Message-ID
<Pine.LNX.4.64.0609062231070.18635@xanadu.home>
In-Reply-To
<7v1wqo5vlz.fsf@assigned-by-dhcp.cox.net>
On Wed, 6 Sep 2006, Junio C Hamano wrote:
Show 12 quoted lines
> Nicolas Pitre <nico@cam.org> writes:
> 
> > BTW I'm half-way done with support for deltas which base object is 
> > referenced with an offset in the pack instead of a hash.  It is quite 
> > messy though since it touches pretty core code all over the place when 
> > it comes to fetching objects out of a pack.
> 
> I wonder how you made unpack-objects to work with it.  Do you
> store an extra bit in the packed stream to say "this object will
> be used as a delta base for later objects so remember its offset
> and resulting SHA1", or do you just remember every entry as you
> unpack?
Every entries.  Much simpler that way.

And the client must ask explicitly whether or not a fetched pack can have base objects referenced by sha1 or offset. So if you're really really tight on memory (like if you cannot afford the extra 50MB of RAM or so for the Mozilla repo for example) then this could be turned off.

But if we decide to not explode packs upon a fetch but keep the downloaded pack as is (after validation) then index generation will come for free.

Nicolas
Previous: Junio C HamanoNext: Shawn Pearce
Message 18 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.