summaryrefslogtreecommitdiff
path: root/diff-delta.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-10-15 06:37:41 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-10-15 06:38:01 (GMT)
commit29f049a0c277be72637f74f1f90a89dccd3475bc (patch)
tree92abcbafbd1f73f9b161ddbf1172fcdae06d5c5d /diff-delta.c
parent0a246571d47642dd7b6b796e601b820ca9f0c8c4 (diff)
downloadgit-29f049a0c277be72637f74f1f90a89dccd3475bc.zip
git-29f049a0c277be72637f74f1f90a89dccd3475bc.tar.gz
git-29f049a0c277be72637f74f1f90a89dccd3475bc.tar.bz2
Revert "move pack creation to version 3"
This reverts commit 16854571aae6302f457c5fbee41ac64669b09595. Git as recent as v1.1.6 do not understand version 3 delta. v1.2.0 is Ok and I personally would say it is old enough, but the improvement between version 2 and version 3 delta is not bit enough to justify breaking older clients. We should resurrect this later, but when we do so we shold make it conditional. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'diff-delta.c')
-rw-r--r--diff-delta.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/diff-delta.c b/diff-delta.c
index 51df460..fa16d06 100644
--- a/diff-delta.c
+++ b/diff-delta.c
@@ -308,8 +308,8 @@ create_delta(const struct delta_index *index,
continue;
if (ref_size > top - src)
ref_size = top - src;
- if (ref_size > 0xffffff)
- ref_size = 0xffffff;
+ if (ref_size > 0x10000)
+ ref_size = 0x10000;
if (ref_size <= msize)
break;
while (ref_size-- && *src++ == *ref)
@@ -318,8 +318,6 @@ create_delta(const struct delta_index *index,
/* this is our best match so far */
msize = ref - entry->ptr;
moff = entry->ptr - ref_data;
- if (msize >= 0x10000)
- break; /* this is good enough */
}
}
@@ -383,8 +381,6 @@ create_delta(const struct delta_index *index,
if (msize & 0xff) { out[outpos++] = msize; i |= 0x10; }
msize >>= 8;
if (msize & 0xff) { out[outpos++] = msize; i |= 0x20; }
- msize >>= 8;
- if (msize & 0xff) { out[outpos++] = msize; i |= 0x40; }
*op = i;
}