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
10
apply.c
10
apply.c
@@ -3210,8 +3210,8 @@ static int apply_binary(struct apply_state *state,
|
||||
unsigned long size;
|
||||
char *result;
|
||||
|
||||
result = repo_read_object_file(the_repository, &oid, &type,
|
||||
&size);
|
||||
result = odb_read_object(the_repository->objects, &oid,
|
||||
&type, &size);
|
||||
if (!result)
|
||||
return error(_("the necessary postimage %s for "
|
||||
"'%s' cannot be read"),
|
||||
@@ -3273,8 +3273,8 @@ static int read_blob_object(struct strbuf *buf, const struct object_id *oid, uns
|
||||
unsigned long sz;
|
||||
char *result;
|
||||
|
||||
result = repo_read_object_file(the_repository, oid, &type,
|
||||
&sz);
|
||||
result = odb_read_object(the_repository->objects, oid,
|
||||
&type, &sz);
|
||||
if (!result)
|
||||
return -1;
|
||||
/* XXX read_sha1_file NUL-terminates */
|
||||
@@ -3503,7 +3503,7 @@ static int resolve_to(struct image *image, const struct object_id *result_id)
|
||||
|
||||
image_clear(image);
|
||||
|
||||
data = repo_read_object_file(the_repository, result_id, &type, &size);
|
||||
data = odb_read_object(the_repository->objects, result_id, &type, &size);
|
||||
if (!data || type != OBJ_BLOB)
|
||||
die("unable to read blob object %s", oid_to_hex(result_id));
|
||||
strbuf_attach(&image->buf, data, size, size + 1);
|
||||
|
||||
Reference in New Issue
Block a user