From: Junio C Hamano Date: Wed, 29 Jun 2005 04:58:56 GMT Subject: Re: [PATCH] denser delta header encoding Message-ID: <7vmzp9kbcf.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Linus, please do not apply this as is. 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. 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?