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, 17:32 UTC
Message-ID
<Pine.LNX.4.64.0609071322010.18635@xanadu.home>
In-Reply-To
<20060907090756.30111.qmail@science.horizon.com>
On Thu, 7 Sep 2006, linux@horizon.com wrote:
Show 9 quoted lines
> > Support for 'thin' packs would pretty much require mixing IDs and
> > (relative) offsets in the same pack file.
> 
> An alternative would be to create a small "placeholder" object that
> just gives an ID, then refer to it by offset.
> 
> That would avoid the need for an id/offset bit with every offset,
> and possibly save more space if the same object was referenced
> multiple times.

Well... I'm using object type 6 for deltas with offset reference (instead of object type 7 that is delta with sha1 reference). So there is no extra bit needed and no backward compatibility breakage.

There could be of course a new object type which payload is only a sha1 that deltas type 6 reference. But that can be introduced at a later date if it turns out to be worthwhile (i.e. the actual saving in real use scenarios is worth the (small but still) added complexity).

> And it just seems simpler.

Well I would not say so. Simply prefixing a delta with the sha1 of its base object cannot be simpler when streaming out a pack.

Nicolas
Previous: A Large Angry SCMNext: linux@horizon.com
Message 9 of 10 in “Re: A look at some alternative PACK file encodings”
  1. linux@horizon.comSep 7, 2006
  2. Jon SmirlSep 7, 2006
  3. linux@horizon.comSep 7, 2006
  4. Jon SmirlSep 7, 2006
  5. linux@horizon.comSep 7, 2006
  6. Richard CurnowSep 7, 2006
  7. Junio C HamanoSep 7, 2006
  8. A Large Angry SCMSep 7, 2006
  9. Nicolas PitreSep 7, 2006
  10. linux@horizon.comSep 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.