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
@ -801,7 +801,8 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
|
||||
if (startup_info->have_repository) {
|
||||
read_lock();
|
||||
collision_test_needed =
|
||||
has_object_file_with_flags(oid, OBJECT_INFO_QUICK);
|
||||
repo_has_object_file_with_flags(the_repository, oid,
|
||||
OBJECT_INFO_QUICK);
|
||||
read_unlock();
|
||||
}
|
||||
|
||||
@ -821,7 +822,8 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
|
||||
die(_("cannot read existing object info %s"), oid_to_hex(oid));
|
||||
if (has_type != type || has_size != size)
|
||||
die(_("SHA1 COLLISION FOUND WITH %s !"), oid_to_hex(oid));
|
||||
has_data = read_object_file(oid, &has_type, &has_size);
|
||||
has_data = repo_read_object_file(the_repository, oid,
|
||||
&has_type, &has_size);
|
||||
read_unlock();
|
||||
if (!data)
|
||||
data = new_data = get_data_from_pack(obj_entry);
|
||||
@ -1414,7 +1416,8 @@ static void fix_unresolved_deltas(struct hashfile *f)
|
||||
|
||||
if (objects[d->obj_no].real_type != OBJ_REF_DELTA)
|
||||
continue;
|
||||
data = read_object_file(&d->oid, &type, &size);
|
||||
data = repo_read_object_file(the_repository, &d->oid, &type,
|
||||
&size);
|
||||
if (!data)
|
||||
continue;
|
||||
|
||||
|
Reference in New Issue
Block a user