summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-03-29 16:32:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-03-29 16:32:51 (GMT)
commit9fadedd637b312089337d73c3ed8447e9f0aa775 (patch)
tree7c3c7fd874855d7bddd25a62495c8b921cc09274 /builtin
parent3bab5d56259722843359702bc27111475437ad2a (diff)
parent2d657ab95fd5be5ebeee43fecec3d7cd94fdd2e4 (diff)
downloadgit-9fadedd637b312089337d73c3ed8447e9f0aa775.zip
git-9fadedd637b312089337d73c3ed8447e9f0aa775.tar.gz
git-9fadedd637b312089337d73c3ed8447e9f0aa775.tar.bz2
Merge branch 'ds/default-pack-use-sparse-to-true'
The 'pack.useSparse' configuration variable now defaults to 'true', enabling an optimization that has been experimental since Git 2.21. * ds/default-pack-use-sparse-to-true: pack-objects: flip the use of GIT_TEST_PACK_SPARSE config: set pack.useSparse=true by default
Diffstat (limited to 'builtin')
-rw-r--r--builtin/pack-objects.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 4c2bb17..dc7c58c 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -3469,9 +3469,9 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
read_replace_refs = 0;
- sparse = git_env_bool("GIT_TEST_PACK_SPARSE", 0);
+ sparse = git_env_bool("GIT_TEST_PACK_SPARSE", -1);
prepare_repo_settings(the_repository);
- if (!sparse && the_repository->settings.pack_use_sparse != -1)
+ if (sparse < 0)
sparse = the_repository->settings.pack_use_sparse;
reset_pack_idx_option(&pack_idx_opts);