refs: convert ref storage format to an enum

The ref storage format is tracked as a simple unsigned integer, which
makes it harder than necessary to discover what that integer actually is
or where its values are defined.

Convert the ref storage format to instead be an enum.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2024-06-06 07:29:01 +02:00
committed by Junio C Hamano
parent a83f7f51e1
commit 318efb966b
8 changed files with 29 additions and 22 deletions

View File

@@ -124,7 +124,8 @@ void repo_set_compat_hash_algo(struct repository *repo, int algo)
repo_read_loose_object_map(repo);
}
void repo_set_ref_storage_format(struct repository *repo, unsigned int format)
void repo_set_ref_storage_format(struct repository *repo,
enum ref_storage_format format)
{
repo->ref_storage_format = format;
}