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:
committed by
Junio C Hamano
parent
e989dd96b8
commit
d4ff88aee3
6
commit.c
6
commit.c
@@ -374,7 +374,7 @@ const void *repo_get_commit_buffer(struct repository *r,
|
||||
if (!ret) {
|
||||
enum object_type type;
|
||||
unsigned long size;
|
||||
ret = repo_read_object_file(r, &commit->object.oid, &type, &size);
|
||||
ret = odb_read_object(r->objects, &commit->object.oid, &type, &size);
|
||||
if (!ret)
|
||||
die("cannot read commit object %s",
|
||||
oid_to_hex(&commit->object.oid));
|
||||
@@ -1275,8 +1275,8 @@ static void handle_signed_tag(const struct commit *parent, struct commit_extra_h
|
||||
desc = merge_remote_util(parent);
|
||||
if (!desc || !desc->obj)
|
||||
return;
|
||||
buf = repo_read_object_file(the_repository, &desc->obj->oid, &type,
|
||||
&size);
|
||||
buf = odb_read_object(the_repository->objects, &desc->obj->oid,
|
||||
&type, &size);
|
||||
if (!buf || type != OBJ_TAG)
|
||||
goto free_return;
|
||||
if (!parse_signature(buf, size, &payload, &signature))
|
||||
|
||||
Reference in New Issue
Block a user