odb: rename repo_read_object_file()

Rename `repo_read_object_file()` to `odb_read_object()` to match other
functions related to the object database and our modern coding
guidelines.

Introduce a compatibility wrapper 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:26 +02:00
committed by Junio C Hamano
parent e989dd96b8
commit d4ff88aee3
47 changed files with 157 additions and 150 deletions

View File

@@ -75,9 +75,9 @@ static void *result(struct merge_list *entry, unsigned long *size)
const char *path = entry->path;
if (!entry->stage)
return repo_read_object_file(the_repository,
&entry->blob->object.oid, &type,
size);
return odb_read_object(the_repository->objects,
&entry->blob->object.oid, &type,
size);
base = NULL;
if (entry->stage == 1) {
base = entry->blob;
@@ -100,9 +100,9 @@ static void *origin(struct merge_list *entry, unsigned long *size)
enum object_type type;
while (entry) {
if (entry->stage == 2)
return repo_read_object_file(the_repository,
&entry->blob->object.oid,
&type, size);
return odb_read_object(the_repository->objects,
&entry->blob->object.oid,
&type, size);
entry = entry->link;
}
return NULL;