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

Re: [PATCH] denser delta header encoding

From
Linus Torvalds <torvalds@osdl.org>
Date
Jun 29, 2005, 05:21 UTC
Message-ID
<Pine.LNX.4.58.0506282217010.19755@ppc970.osdl.org>
In-Reply-To
<7vmzp9kbcf.fsf@assigned-by-dhcp.cox.net>
On Tue, 28 Jun 2005, Junio C Hamano wrote:
>
> Linus, please do not apply this as is.
Argh. Too late.
> There are code other than what Nico updated with this patch in
> sha1_file.c that also need updating, that count the number of
> bytes in the delta-patch result by reading from the delta
> header.

Hmm.. I tested this (along with my change to make the pack object also use the little-endian size encoding) with "gitk" on a packed git archive, and with git-unpack-objects. So it can't break _too_ seriously. Is it the "git-cat-file -s" thing that gets the wrong answer?

Ahh. I see it. "packed_delta_info()". And it looks like "diff" uses it too. Oh, for the copy and rename detection. I don't think I tested that part, nope.

Show 14 quoted lines
> I wonder if we can have a helper function in delta suite
> somewhere (maybe in diff-delta.c):
> 
>     int look_at_delta_header(void **delta_data, ulong delta_size,
>     	                     ulong *src_size, ulong *dst_size)
> 
> that:
> 
>     - checks delta size and barf if it is small;
>     - reads the header and fills src_size and dst_size;
>     - advances *delta_data pointer;
> 
> and have count-delta, patch-delta and sha1_file.c users use it
> consistently.  Nico, what do you think?
Sounds like a good idea.
		Linus
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 9 in “denser delta header encoding”
  1. denser delta header encodingNicolas Pitre, Jun 29, 2005
  2. Junio C HamanoJun 29, 2005
  3. Linus TorvaldsJun 29, 2005
  4. Junio C HamanoJun 29, 2005
  5. Linus TorvaldsJun 29, 2005
  6. Nicolas PitreJun 29, 2005
  7. Junio C HamanoJun 29, 2005
  8. Linus TorvaldsJun 29, 2005
  9. Adjust t5300 test for unpack-objects changeJunio C Hamano, Jun 29, 2005

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.