@matheusbsbs / matheus-bagliano / commits / 91c7674371
Fork 0

count-delta.c: Match the delta data semantics change in version 3.

This matches the count_delta() logic to the change previous commit introduces to patch_delta(). Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Feb 9, 2006 at 17:15 UTC 91c7674371c101766242b52ea1880cd919cb3075
1 file changed +2 -5
count-delta.c
+2 -5
@@ -50,13 +50,10 @@ int count_delta(void *delta_buf, unsigned long delta_size,
50 if (cmd & 0x08) cp_off |= (*data++ << 24);
51 if (cmd & 0x10) cp_size = *data++;
52 if (cmd & 0x20) cp_size |= (*data++ << 8);
53 + if (cmd & 0x40) cp_size |= (*data++ << 16);
54 if (cp_size == 0) cp_size = 0x10000;
55
55 - if (cmd & 0x40)
56 - /* copy from dst */
57 - ;
58 - else
59 - copied_from_source += cp_size;
56 + copied_from_source += cp_size;
57 out += cp_size;
58 } else {
59 /* write literal into dst */