odb: rename oid_object_info()

Rename `oid_object_info()` to `odb_read_object_info()` as well as their
`_extended()` variant to match other functions related to the object
database and our modern coding guidelines.

Introduce compatibility wrappers so that any in-flight topics will
continue to compile.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2025-07-01 14:22:25 +02:00
committed by Junio C Hamano
parent 16cf749496
commit e989dd96b8
48 changed files with 213 additions and 170 deletions

View File

@@ -968,7 +968,7 @@ static int check_has_commit(const struct object_id *oid, void *data)
return 0;
}
type = oid_object_info(&subrepo, oid, NULL);
type = odb_read_object_info(subrepo.objects, oid, NULL);
switch (type) {
case OBJ_COMMIT:
@@ -1752,8 +1752,7 @@ static int fetch_start_failure(struct strbuf *err UNUSED,
static int commit_missing_in_sub(const struct object_id *oid, void *data)
{
struct repository *subrepo = data;
enum object_type type = oid_object_info(subrepo, oid, NULL);
enum object_type type = odb_read_object_info(subrepo->objects, oid, NULL);
return type != OBJ_COMMIT;
}