diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-11-01 13:48:08 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-11-01 13:48:08 -0700 |
commit | 7afb458e9108632b7b9c32b08bfd7bca088e610c (patch) | |
tree | 50235f02e8e9d12e43bbb0accc04a0413334b04b /builtin/gc.c | |
parent | b82299ec6fe245595b3ac4abf5458bcb032ba62e (diff) | |
parent | a897ab7ed143b2790f05785a3b1916f8a71c7a8c (diff) |
Merge branch 'gc/use-repo-settings'
It is wrong to read some settings directly from the config
subsystem, as things like feature.experimental can affect their
default values.
* gc/use-repo-settings:
gc: perform incremental repack when implictly enabled
fsck: verify multi-pack-index when implictly enabled
fsck: verify commit graph when implicitly enabled
Diffstat (limited to 'builtin/gc.c')
-rw-r--r-- | builtin/gc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index 6b3de3dd51..2670931160 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -1049,12 +1049,11 @@ static int maintenance_task_loose_objects(struct maintenance_run_opts *opts) static int incremental_repack_auto_condition(void) { struct packed_git *p; - int enabled; int incremental_repack_auto_limit = 10; int count = 0; - if (git_config_get_bool("core.multiPackIndex", &enabled) || - !enabled) + prepare_repo_settings(the_repository); + if (!the_repository->settings.core_multi_pack_index) return 0; git_config_get_int("maintenance.incremental-repack.auto", |