cocci: apply the "object-store.h" part of "the_repository.pending"
Apply the part of "the_repository.pending.cocci" pertaining to "object-store.h". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
085390328f
commit
bc726bd075
@ -263,7 +263,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 = read_object_file(&ce->oid, &type, &size);
|
||||
buffer = repo_read_object_file(the_repository, &ce->oid, &type, &size);
|
||||
if (buffer) {
|
||||
if (size == sb.len)
|
||||
match = memcmp(buffer, sb.buf, size);
|
||||
@ -3553,7 +3553,8 @@ void *read_blob_data_from_index(struct index_state *istate,
|
||||
}
|
||||
if (pos < 0)
|
||||
return NULL;
|
||||
data = read_object_file(&istate->cache[pos]->oid, &type, &sz);
|
||||
data = repo_read_object_file(the_repository, &istate->cache[pos]->oid,
|
||||
&type, &sz);
|
||||
if (!data || type != OBJ_BLOB) {
|
||||
free(data);
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user