diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-03-29 09:32:51 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-03-29 09:32:51 -0700 |
commit | 9fadedd637b312089337d73c3ed8447e9f0aa775 (patch) | |
tree | 7c3c7fd874855d7bddd25a62495c8b921cc09274 /builtin | |
parent | The second batch post 2.26 cycle (diff) | |
parent | pack-objects: flip the use of GIT_TEST_PACK_SPARSE (diff) | |
download | tgif-9fadedd637b312089337d73c3ed8447e9f0aa775.tar.xz |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 4c2bb170c6..dc7c58ce3f 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); |