diff options
author | Nicolas Pitre <nico@cam.org> | 2006-02-09 17:50:04 -0500 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-02-09 21:06:38 -0800 |
commit | d60fc1c8649f80c006b9f493c542461e81608d4b (patch) | |
tree | d481762cf3c8954e9bc635c61127b77342ae79d0 /pack.h | |
parent | 67d42212ff104aaafa97b943cb369b8444f61581 (diff) | |
download | git-d60fc1c8649f80c006b9f493c542461e81608d4b.tar.gz |
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 <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'pack.h')
-rw-r--r-- | pack.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -21,6 +21,7 @@ enum object_type { */ #define PACK_SIGNATURE 0x5041434b /* "PACK" */ #define PACK_VERSION 2 +#define pack_version_ok(v) ((v) == htonl(2) || (v) == htonl(3)) struct pack_header { unsigned int hdr_signature; unsigned int hdr_version; |