streaming: convert istream internals to struct object_id
[gitweb.git] / builtin / index-pack.c
index 9744175e2314617a448a34370e3606c16209ef74..32a98f3102aab6ae9784fa26fa38c40c0623dde3 100644 (file)
@@ -221,7 +221,7 @@ static unsigned check_object(struct object *obj)
 
        if (!(obj->flags & FLAG_CHECKED)) {
                unsigned long size;
-               int type = sha1_object_info(obj->oid.hash, &size);
+               int type = oid_object_info(&obj->oid, &size);
                if (type <= 0)
                        die(_("did not receive expected object %s"),
                              oid_to_hex(&obj->oid));
@@ -771,7 +771,7 @@ static int check_collison(struct object_entry *entry)
 
        memset(&data, 0, sizeof(data));
        data.entry = entry;
-       data.st = open_istream(entry->idx.oid.hash, &type, &size, NULL);
+       data.st = open_istream(&entry->idx.oid, &type, &size, NULL);
        if (!data.st)
                return -1;
        if (size != entry->size || type != entry->type)
@@ -810,7 +810,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 = sha1_object_info(oid->hash, &has_size);
+               has_type = oid_object_info(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)
@@ -1377,7 +1377,7 @@ static void fix_unresolved_deltas(struct hashfile *f)
                if (!base_obj->data)
                        continue;
 
-               if (check_sha1_signature(d->oid.hash, base_obj->data,
+               if (check_object_signature(&d->oid, base_obj->data,
                                base_obj->size, type_name(type)))
                        die(_("local object %s is corrupt"), oid_to_hex(&d->oid));
                base_obj->obj = append_obj_to_pack(f, d->oid.hash,