From d60fc1c8649f80c006b9f493c542461e81608d4b Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Thu, 9 Feb 2006 17:50:04 -0500 Subject: remove delta-against-self bit After experimenting with code to add the ability to encode a delta against part of the deltified file, it turns out that resulting packs are _bigger_ than when this ability is not used. The raw delta output might be smaller, but it doesn't compress as well using gzip with a negative net saving on average. Said bit would in fact be more useful to allow for encoding the copying of chunks larger than 64KB providing more savings with large files. This will correspond to packs version 3. While the current code still produces packs version 2, it is made future proof so pack versions 2 and 3 are accepted. Any pack version 2 are compatible with version 3 since the redefined bit was never used before. When enough time has passed, code to use that bit to produce version 3 packs could be added. Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- pack-check.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pack-check.c') diff --git a/pack-check.c b/pack-check.c index 511f29424a..67a7ecdf16 100644 --- a/pack-check.c +++ b/pack-check.c @@ -16,9 +16,9 @@ static int verify_packfile(struct packed_git *p) hdr = p->pack_base; if (hdr->hdr_signature != htonl(PACK_SIGNATURE)) return error("Packfile %s signature mismatch", p->pack_name); - if (hdr->hdr_version != htonl(PACK_VERSION)) - return error("Packfile version %d different from ours %d", - ntohl(hdr->hdr_version), PACK_VERSION); + if (!pack_version_ok(hdr->hdr_version)) + return error("Packfile version %d unsupported", + ntohl(hdr->hdr_version)); nr_objects = ntohl(hdr->hdr_entries); if (num_packed_objects(p) != nr_objects) return error("Packfile claims to have %d objects, " -- cgit v1.2.3