odb: rename read_object_with_reference()
Rename `read_object_with_reference()` to `odb_read_object_peeled()` to match other functions related to the object database and our modern coding guidelines. Furthermore though, the old name didn't really describe very well what this function actually does, which is to walk down any commit and tag objects until an object of the required type has been found. This is generally referred to as "peeling", so the new name should be way more descriptive. No compatibility wrapper is introduced as the function is not used a lot throughout our codebase. 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
08218b8cd4
commit
841a03b404
@@ -2055,8 +2055,8 @@ static void add_preferred_base(struct object_id *oid)
|
||||
if (window <= num_preferred_base++)
|
||||
return;
|
||||
|
||||
data = read_object_with_reference(the_repository, oid,
|
||||
OBJ_TREE, &size, &tree_oid);
|
||||
data = odb_read_object_peeled(the_repository->objects, oid,
|
||||
OBJ_TREE, &size, &tree_oid);
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user