Re: [PATCH] count-delta.c: Match the delta data semantics change in version 3.
- From
Nicolas Pitre <nico@cam.org>
- Date
- Feb 10, 2006, 15:20 UTC
- Message-ID
- <Pine.LNX.4.64.0602101017420.5397@localhost.localdomain>
- In-Reply-To
- <Pine.LNX.4.64.0602092053200.5397@localhost.localdomain>
On Thu, 9 Feb 2006, Nicolas Pitre wrote:
Show 11 quoted lines
> On Thu, 9 Feb 2006, Junio C Hamano wrote: > > > Junio C Hamano <junkio@cox.net> writes: > > > > > The bit is however _already_ looked at by the count_delta(), > > > to assess the extent of damage, IIRC. Should we be > > > futureproofing that bit as well? > > > > Something like this? > > Right.
I'm not sure to fully understand what you meant in the comment below. but if it was related to the removed code, maybe this patch would make sense:
diff --git a/count-delta.c b/count-delta.c index 978a60c..058a2aa 100644 --- a/count-delta.c +++ b/count-delta.c @@ -16,11 +16,7 @@ * * Number of bytes that are _not_ copied from the source is deletion, * and number of inserted literal bytes are addition, so sum of them - * is the extent of damage. xdelta can express an edit that copies - * data inside of the destination which originally came from the - * source. We do not count that in the following routine, so we are - * undercounting the source material that remains in the final output - * that way. + * is the extent of damage. */ int count_delta(void *delta_buf, unsigned long delta_size, unsigned long *src_copied, unsigned long *literal_added)