diff options
| author | Justin Tobler <jltobler@gmail.com> | 2024-04-08 16:16:54 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-04-08 12:11:10 -0700 |
| commit | 7c8eb5928f3ae504f9ce92b67a1eb41db82d81f7 (patch) | |
| tree | 32bf9704970041645ebf8e6d9c7b89b5e5a546ee /refs/reftable-backend.c | |
| parent | bc91330cecfdc9a00a486923126a969fee6ace36 (diff) | |
| download | git-7c8eb5928f3ae504f9ce92b67a1eb41db82d81f7.tar.gz | |
reftable/stack: add env to disable autocompaction
In future tests it will be neccesary to create repositories with a set
number of tables. To make this easier, introduce the
`GIT_TEST_REFTABLE_AUTOCOMPACTION` environment variable that, when set
to false, disables autocompaction of reftables.
Signed-off-by: Justin Tobler <jltobler@gmail.com>
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/reftable-backend.c')
| -rw-r--r-- | refs/reftable-backend.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c index 0bed6d2ab4..1cda48c504 100644 --- a/refs/reftable-backend.c +++ b/refs/reftable-backend.c @@ -18,6 +18,7 @@ #include "../reftable/reftable-merged.h" #include "../setup.h" #include "../strmap.h" +#include "parse.h" #include "refs-internal.h" /* @@ -247,6 +248,8 @@ static struct ref_store *reftable_be_init(struct repository *repo, refs->write_options.block_size = 4096; refs->write_options.hash_id = repo->hash_algo->format_id; refs->write_options.default_permissions = calc_shared_perm(0666 & ~mask); + refs->write_options.disable_auto_compact = + !git_env_bool("GIT_TEST_REFTABLE_AUTOCOMPACTION", 1); /* * Set up the main reftable stack that is hosted in GIT_COMMON_DIR. |
