aboutsummaryrefslogtreecommitdiff
path: root/count-delta.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-02-09 17:15:59 -0800
committerJunio C Hamano <junkio@cox.net>2006-02-09 21:06:38 -0800
commit91c7674371c101766242b52ea1880cd919cb3075 (patch)
tree1cf1972a71cf8fb0c17c5bec8f18cdd76edcd935 /count-delta.c
parentd60fc1c8649f80c006b9f493c542461e81608d4b (diff)
downloadgit-91c7674371c101766242b52ea1880cd919cb3075.tar.gz
git-91c7674371c101766242b52ea1880cd919cb3075.tar.xz
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>
Diffstat (limited to 'count-delta.c')
-rw-r--r--count-delta.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/count-delta.c b/count-delta.c
index 7559ff68b..978a60ca9 100644
--- a/count-delta.c
+++ b/count-delta.c
@@ -50,13 +50,10 @@ int count_delta(void *delta_buf, unsigned long delta_size,
if (cmd & 0x08) cp_off |= (*data++ << 24);
if (cmd & 0x10) cp_size = *data++;
if (cmd & 0x20) cp_size |= (*data++ << 8);
+ if (cmd & 0x40) cp_size |= (*data++ << 16);
if (cp_size == 0) cp_size = 0x10000;
- if (cmd & 0x40)
- /* copy from dst */
- ;
- else
- copied_from_source += cp_size;
+ copied_from_source += cp_size;
out += cp_size;
} else {
/* write literal into dst */