Merge branch 'sb/oid-object-info'
The codepath around object-info API has been taught to take the repository object (which in turn tells the API which object store the objects are to be located). * sb/oid-object-info: cache.h: allow oid_object_info to handle arbitrary repositories packfile: add repository argument to cache_or_unpack_entry packfile: add repository argument to unpack_entry packfile: add repository argument to read_object packfile: add repository argument to packed_object_info packfile: add repository argument to packed_to_object_type packfile: add repository argument to retry_bad_packed_offset cache.h: add repository argument to oid_object_info cache.h: add repository argument to oid_object_info_extended
This commit is contained in:
@ -223,7 +223,7 @@ static unsigned check_object(struct object *obj)
|
||||
|
||||
if (!(obj->flags & FLAG_CHECKED)) {
|
||||
unsigned long size;
|
||||
int type = oid_object_info(&obj->oid, &size);
|
||||
int type = oid_object_info(the_repository, &obj->oid, &size);
|
||||
if (type <= 0)
|
||||
die(_("did not receive expected object %s"),
|
||||
oid_to_hex(&obj->oid));
|
||||
@ -812,7 +812,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
|
||||
enum object_type has_type;
|
||||
unsigned long has_size;
|
||||
read_lock();
|
||||
has_type = oid_object_info(oid, &has_size);
|
||||
has_type = oid_object_info(the_repository, oid, &has_size);
|
||||
if (has_type < 0)
|
||||
die(_("cannot read existing object info %s"), oid_to_hex(oid));
|
||||
if (has_type != type || has_size != size)
|
||||
|
Reference in New Issue
Block a user