summaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-06-04 09:46:27 +0200
committerJunio C Hamano <gitster@pobox.com>2026-06-05 21:49:38 +0900
commit3d884b0b5656fe012002edd6bb8f36a125e6c17e (patch)
treefa5201a0046b1ed3bed3273e437a71b7a2524d56 /commit-graph.c
parent452ad8db6d9155d6c7305d6045d29c49a7cc9c7c (diff)
setup: deduplicate logic to apply repository format
After having discovered the repository format we then apply it to the repository so that it knows to use the proper repository extensions. The logic to apply the format is duplicated across three callsites, which makes it rather painfull to add new extensions. Introduce a new function `apply_repository_format()` that takes a repo and applies a given format to it and adapt all callsites to use it. This function is also the new caller of `verify_repository_format()` so that we can ensure that we never apply an invalid repository format. The verification we have in `read_and_verify_repository_format()` is thus redundant now and dropped. Rename `read_and_verify_repository_format()` accordingly. While at it, also rename `check_repository_format()` to clarify that it doesn't only _check_ the format, but that it also applies it. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions