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
@@ -1265,7 +1265,7 @@ static void load_tree(struct tree_entry *root)
|
||||
die("Can't load tree %s", oid_to_hex(oid));
|
||||
} else {
|
||||
enum object_type type;
|
||||
buf = repo_read_object_file(the_repository, oid, &type, &size);
|
||||
buf = odb_read_object(the_repository->objects, oid, &type, &size);
|
||||
if (!buf || type != OBJ_TREE)
|
||||
die("Can't load tree %s", oid_to_hex(oid));
|
||||
}
|
||||
@@ -3002,7 +3002,7 @@ static void cat_blob(struct object_entry *oe, struct object_id *oid)
|
||||
char *buf;
|
||||
|
||||
if (!oe || oe->pack_id == MAX_PACK_ID) {
|
||||
buf = repo_read_object_file(the_repository, oid, &type, &size);
|
||||
buf = odb_read_object(the_repository->objects, oid, &type, &size);
|
||||
} else {
|
||||
type = oe->type;
|
||||
buf = gfi_unpack_entry(oe, &size);
|
||||
@@ -3110,8 +3110,8 @@ static struct object_entry *dereference(struct object_entry *oe,
|
||||
buf = gfi_unpack_entry(oe, &size);
|
||||
} else {
|
||||
enum object_type unused;
|
||||
buf = repo_read_object_file(the_repository, oid, &unused,
|
||||
&size);
|
||||
buf = odb_read_object(the_repository->objects, oid,
|
||||
&unused, &size);
|
||||
}
|
||||
if (!buf)
|
||||
die("Can't load object %s", oid_to_hex(oid));
|
||||
|
||||
Reference in New Issue
Block a user