diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-08-16 10:56:58 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-16 09:55:21 -0700 |
commit | 39e15b789ad3c3a192f4c8abde3daff83a053aaa (patch) | |
tree | 4dda7d4aa00f999010b9fbb5ef39fd1200da2533 /t/unit-tests/t-oid-array.c | |
parent | 7689f6cbd11cbfd0828a77a5fb070d5a2f06edc7 (diff) |
setup: merge configuration of repository formats
The configuration of repository formats is split up across two functions
`validate_hash_algorithm()` and `validate_ref_storage_format()`. This is
fine as-is, but we are about to extend the logic to also read default
values from the config. With the logic split across two functions, we
would either have to pass in additional parameters read from the config,
or read the config multiple times. Both of these options feel a bit
unwieldy.
Merge the code into a new function `repository_format_configure()` that
is responsible for configuring the whole repository's format. Like this,
we can easily read the config in a single place, only.
Furthermore, move the calls to `repo_set_ref_storage_format()` and
`repo_set_hash_algo()` into this new function as well, such that all the
logic to configure the repository format is self-contained here.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests/t-oid-array.c')
0 files changed, 0 insertions, 0 deletions