diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-10-27 23:09:47 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-10-27 23:09:47 +0100 |
commit | 52b8c8c7165987650bf873b878f20b14c33b268f (patch) | |
tree | 73e72e91071a27d772680e9ba128ed98cb7a2f19 /repo-settings.c | |
parent | Merge branch 'rs/worktree-list-show-locked' (diff) | |
parent | maintenance: add incremental-repack auto condition (diff) | |
download | git-52b8c8c7165987650bf873b878f20b14c33b268f.tar.xz git-52b8c8c7165987650bf873b878f20b14c33b268f.zip |
Merge branch 'ds/maintenance-part-2'
"git maintenance", an extended big brother of "git gc", continues
to evolve.
* ds/maintenance-part-2:
maintenance: add incremental-repack auto condition
maintenance: auto-size incremental-repack batch
maintenance: add incremental-repack task
midx: use start_delayed_progress()
midx: enable core.multiPackIndex by default
maintenance: create auto condition for loose-objects
maintenance: add loose-objects task
maintenance: add prefetch task
Diffstat (limited to 'repo-settings.c')
-rw-r--r-- | repo-settings.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/repo-settings.c b/repo-settings.c index 88ccce2036..f7fff0f5ab 100644 --- a/repo-settings.c +++ b/repo-settings.c @@ -1,6 +1,7 @@ #include "cache.h" #include "config.h" #include "repository.h" +#include "midx.h" #define UPDATE_DEFAULT_BOOL(s,v) do { if (s == -1) { s = v; } } while(0) @@ -52,6 +53,11 @@ void prepare_repo_settings(struct repository *r) r->settings.pack_use_sparse = value; UPDATE_DEFAULT_BOOL(r->settings.pack_use_sparse, 1); + value = git_env_bool(GIT_TEST_MULTI_PACK_INDEX, 0); + if (value || !repo_config_get_bool(r, "core.multipackindex", &value)) + r->settings.core_multi_pack_index = value; + UPDATE_DEFAULT_BOOL(r->settings.core_multi_pack_index, 1); + if (!repo_config_get_bool(r, "feature.manyfiles", &value) && value) { UPDATE_DEFAULT_BOOL(r->settings.index_version, 4); UPDATE_DEFAULT_BOOL(r->settings.core_untracked_cache, UNTRACKED_CACHE_WRITE); |