summaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-11-16 01:42:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-11-16 05:16:22 (GMT)
commit8de7eeb54b6aaa6d429b5d9c2b667847c35480ff (patch)
tree9855ab2f0cf5e5ec9ba2e6ae347730c0edced095 /environment.c
parent3ab228137f980ff72dbdf5064a877d07bec76df9 (diff)
downloadgit-8de7eeb54b6aaa6d429b5d9c2b667847c35480ff.zip
git-8de7eeb54b6aaa6d429b5d9c2b667847c35480ff.tar.gz
git-8de7eeb54b6aaa6d429b5d9c2b667847c35480ff.tar.bz2
compression: unify pack.compression configuration parsing
There are three codepaths that use a variable whose name is pack_compression_level to affect how objects and deltas sent to a packfile is compressed. Unlike zlib_compression_level that controls the loose object compression, however, this variable was static to each of these codepaths. Two of them read the pack.compression configuration variable, using core.compression as the default, and one of them also allowed overriding it from the command line. The other codepath in bulk-checkin did not pay any attention to the configuration. Unify the configuration parsing to git_default_config(), where we implement the parsing of core.loosecompression and core.compression and make the former override the latter, by moving code to parse pack.compression and also allow core.compression to give default to this variable. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/environment.c b/environment.c
index 0935ec6..4bce3ee 100644
--- a/environment.c
+++ b/environment.c
@@ -34,7 +34,7 @@ const char *git_attributes_file;
const char *git_hooks_path;
int zlib_compression_level = Z_BEST_SPEED;
int core_compression_level;
-int core_compression_seen;
+int pack_compression_level = Z_DEFAULT_COMPRESSION;
int fsync_object_files;
size_t packed_git_window_size = DEFAULT_PACKED_GIT_WINDOW_SIZE;
size_t packed_git_limit = DEFAULT_PACKED_GIT_LIMIT;