diff options
author | Taylor Blau <me@ttaylorr.com> | 2024-02-05 23:50:23 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-02-06 00:27:01 +0100 |
commit | 23c1e71369f4a5a5e5b176d77cfc9d8edf68ebec (patch) | |
tree | c607a3e02c92357e7ed9f6bd2f5f70e726ed0061 /repo-settings.c | |
parent | t5332-multi-pack-reuse.sh: extract pack-objects helper functions (diff) | |
download | git-23c1e71369f4a5a5e5b176d77cfc9d8edf68ebec.tar.xz git-23c1e71369f4a5a5e5b176d77cfc9d8edf68ebec.zip |
pack-objects: enable multi-pack reuse via `feature.experimental`
Now that multi-pack reuse is supported, enable it via the
feature.experimental configuration in addition to the classic
`pack.allowPackReuse`.
This will allow more users to experiment with the new behavior who might
not otherwise be aware of the existing `pack.allowPackReuse`
configuration option.
The enum with values NO_PACK_REUSE, SINGLE_PACK_REUSE, and
MULTI_PACK_REUSE is defined statically in builtin/pack-objects.c's
compilation unit. We could hoist that enum into a scope visible from the
repository_settings struct, and then use that enum value in
pack-objects. Instead, define a single int that indicates what
pack-objects's default value should be to avoid additional unnecessary
code movement.
Though `feature.experimental` implies `pack.allowPackReuse=multi`, this
can still be overridden by explicitly setting the latter configuration
to either "single" or "false". Tests covering all of these cases are
showin t5332.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'repo-settings.c')
-rw-r--r-- | repo-settings.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/repo-settings.c b/repo-settings.c index 30cd478762..a0b590bc6c 100644 --- a/repo-settings.c +++ b/repo-settings.c @@ -43,6 +43,7 @@ void prepare_repo_settings(struct repository *r) if (experimental) { r->settings.fetch_negotiation_algorithm = FETCH_NEGOTIATION_SKIPPING; r->settings.pack_use_bitmap_boundary_traversal = 1; + r->settings.pack_use_multi_pack_reuse = 1; } if (manyfiles) { r->settings.index_version = 4; |