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
@@ -254,7 +254,7 @@ static int ce_compare_link(const struct cache_entry *ce, size_t expected_size)
|
||||
if (strbuf_readlink(&sb, ce->name, expected_size))
|
||||
return -1;
|
||||
|
||||
buffer = repo_read_object_file(the_repository, &ce->oid, &type, &size);
|
||||
buffer = odb_read_object(the_repository->objects, &ce->oid, &type, &size);
|
||||
if (buffer) {
|
||||
if (size == sb.len)
|
||||
match = memcmp(buffer, sb.buf, size);
|
||||
@@ -3485,8 +3485,8 @@ void *read_blob_data_from_index(struct index_state *istate,
|
||||
}
|
||||
if (pos < 0)
|
||||
return NULL;
|
||||
data = repo_read_object_file(the_repository, &istate->cache[pos]->oid,
|
||||
&type, &sz);
|
||||
data = odb_read_object(the_repository->objects, &istate->cache[pos]->oid,
|
||||
&type, &sz);
|
||||
if (!data || type != OBJ_BLOB) {
|
||||
free(data);
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user