Skip to content

Commit

Permalink
count-delta.c: Match the delta data semantics change in version 3.
Browse files Browse the repository at this point in the history
This matches the count_delta() logic to the change previous
commit introduces to patch_delta().

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Feb 10, 2006
1 parent d60fc1c commit 91c7674
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions count-delta.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 91c7674

Please sign in to comment.