From: Junio C Hamano Date: Sun, 20 May 2007 09:19:19 +0000 (-0700) Subject: Merge branch 'dh/pack' X-Git-Tag: v1.5.3-rc0~215 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=45bde46bfb9cbc5565f9fc6caa819333578c53e1;p=git.git Merge branch 'dh/pack' * dh/pack: Custom compression levels for objects and packs --- 45bde46bfb9cbc5565f9fc6caa819333578c53e1 diff --cc Documentation/config.txt index b8d48d101,382a31bb4..ee1c35e8e --- a/Documentation/config.txt +++ b/Documentation/config.txt @@@ -204,11 -204,30 +204,17 @@@ core.warnAmbiguousRefs: and might match multiple refs in the .git/refs/ tree. True by default. core.compression:: + An integer -1..9, indicating a default compression level. + -1 is the zlib default. 0 means no compression, + and 1..9 are various speed/size tradeoffs, 9 being slowest. + + core.loosecompression:: An integer -1..9, indicating the compression level for objects that - are not in a pack file. -1 is the zlib and git default. 0 means no + are not in a pack file. -1 is the zlib default. 0 means no compression, and 1..9 are various speed/size tradeoffs, 9 being - slowest. + slowest. If not set, defaults to core.compression. If that is + not set, defaults to 0 (best speed). -core.legacyheaders:: - A boolean which - changes the format of loose objects so that they are more - efficient to pack and to send out of the repository over git - native protocol, since v1.4.2. However, loose objects - written in the new format cannot be read by git older than - that version; people fetching from your repository using - older versions of git over dumb transports (e.g. http) - will also be affected. -+ -To let git use the new loose object format, you have to -set core.legacyheaders to false. - core.packedGitWindowSize:: Number of bytes of a pack file to map into memory in a single mapping operation. Larger window sizes may allow diff --cc config.c index 521ebef38,5627ed6a7..0614c2b29 --- a/config.c +++ b/config.c @@@ -299,7 -301,12 +301,7 @@@ int git_default_config(const char *var return 0; } - if (!strcmp(var, "core.compression")) { - if (!strcmp(var, "core.legacyheaders")) { - use_legacy_headers = git_config_bool(var, value); - return 0; - } - + if (!strcmp(var, "core.loosecompression")) { int level = git_config_int(var, value); if (level == -1) level = Z_DEFAULT_COMPRESSION;