Git development
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Junio C Hamano <junkio@cox.net>
Cc: Nicolas Pitre <nico@cam.org>, git@vger.kernel.org
Subject: Re: [PATCH] denser delta header encoding
Date: Tue, 28 Jun 2005 22:21:37 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0506282217010.19755@ppc970.osdl.org> (raw)
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.

> 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

  reply	other threads:[~2005-06-29  5:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-29  4:27 [PATCH] denser delta header encoding Nicolas Pitre
2005-06-29  4:58 ` Junio C Hamano
2005-06-29  5:21   ` Linus Torvalds [this message]
2005-06-29  5:35     ` Junio C Hamano
2005-06-29  5:44       ` Linus Torvalds
2005-06-29  5:49         ` Nicolas Pitre
2005-06-29  5:59           ` Junio C Hamano
2005-06-29  6:07             ` Linus Torvalds
2005-06-29  6:07             ` [PATCH] Adjust t5300 test for unpack-objects change Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0506282217010.19755@ppc970.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=nico@cam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox