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 - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Wed Jun 29 15:21:31 2005
This archive was generated by hypermail 2.1.8 : 2005-06-29 15:21:36 EST