aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-01-31 13:32:05 -0800
committerJunio C Hamano <gitster@pobox.com>2017-01-31 13:32:05 -0800
commitbdc370a5c1439cbfa020a516d69108dc87a4be7c (patch)
tree76c9b529a2628f7f448a03a816e73e65ad3fa992 /builtin
parent844f7e61c9c2fcacc05eaa826a4695f20050dce5 (diff)
parent8de7eeb54b6aaa6d429b5d9c2b667847c35480ff (diff)
downloadgit-bdc370a5c1439cbfa020a516d69108dc87a4be7c.tar.gz
git-bdc370a5c1439cbfa020a516d69108dc87a4be7c.tar.xz
Merge branch 'jc/compression-config' into maint
Compression setting for producing packfiles were spread across three codepaths, one of which did not honor any configuration. Unify these so that all of them honor core.compression and pack.compression variables the same way. * jc/compression-config: compression: unify pack.compression configuration parsing
Diffstat (limited to 'builtin')
-rw-r--r--builtin/pack-objects.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 0fd52bd6b..8841f8b36 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -61,8 +61,6 @@ static int delta_search_threads;
static int pack_to_stdout;
static int num_preferred_base;
static struct progress *progress_state;
-static int pack_compression_level = Z_DEFAULT_COMPRESSION;
-static int pack_compression_seen;
static struct packed_git *reuse_packfile;
static uint32_t reuse_packfile_objects;
@@ -2368,16 +2366,6 @@ static int git_pack_config(const char *k, const char *v, void *cb)
depth = git_config_int(k, v);
return 0;
}
- if (!strcmp(k, "pack.compression")) {
- int level = git_config_int(k, v);
- if (level == -1)
- level = Z_DEFAULT_COMPRESSION;
- else if (level < 0 || level > Z_BEST_COMPRESSION)
- die("bad pack compression level %d", level);
- pack_compression_level = level;
- pack_compression_seen = 1;
- return 0;
- }
if (!strcmp(k, "pack.deltacachesize")) {
max_delta_cache_size = git_config_int(k, v);
return 0;
@@ -2869,8 +2857,6 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
reset_pack_idx_option(&pack_idx_opts);
git_config(git_pack_config, NULL);
- if (!pack_compression_seen && core_compression_seen)
- pack_compression_level = core_compression_level;
progress = isatty(2);
argc = parse_options(argc, argv, prefix, pack_objects_options,