Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Revert "move pack creation to version 3"
author
Junio C Hamano
<junkio@cox.net>
Sun, 15 Oct 2006 06:37:41 +0000
(23:37 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Sun, 15 Oct 2006 06:38:01 +0000
(23:38 -0700)
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>
diff-delta.c
patch
|
blob
|
history
pack.h
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
0a24657
)
diff --git
a/diff-delta.c
b/diff-delta.c
index 51df4608a8186e519bcb3b4e67d421c18efb696a..fa16d06c8d1e85a458428c673cb2f589857f5424 100644
(file)
--- 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;
continue;
if (ref_size > top - src)
ref_size = top - src;
- if (ref_size > 0x
ffffff
)
- ref_size = 0x
ffffff
;
+ if (ref_size > 0x
10000
)
+ ref_size = 0x
10000
;
if (ref_size <= msize)
break;
while (ref_size-- && *src++ == *ref)
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;
/* 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; }
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;
}
*op = i;
}
diff --git
a/pack.h
b/pack.h
index 05557da1528e3185cf4d7d89a6577beb8f9e95ad..eb07b033ae54941d4bd00ee6bc30c7d50fd039b0 100644
(file)
--- a/
pack.h
+++ b/
pack.h
@@
-7,7
+7,7
@@
* Packed object header
*/
#define PACK_SIGNATURE 0x5041434b /* "PACK" */
* Packed object header
*/
#define PACK_SIGNATURE 0x5041434b /* "PACK" */
-#define PACK_VERSION
3
+#define PACK_VERSION
2
#define pack_version_ok(v) ((v) == htonl(2) || (v) == htonl(3))
struct pack_header {
unsigned int hdr_signature;
#define pack_version_ok(v) ((v) == htonl(2) || (v) == htonl(3))
struct pack_header {
unsigned int hdr_signature;