]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/index-pack.c
sha1_file: convert read_sha1_file to struct object_id
[thirdparty/git.git] / builtin / index-pack.c
index 32a98f3102aab6ae9784fa26fa38c40c0623dde3..7873e7243ff1cd7bb705384d5579ae2c7334663a 100644 (file)
@@ -815,7 +815,7 @@ 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_sha1_file(oid->hash, &has_type, &has_size);
+               has_data = read_object_file(oid, &has_type, &has_size);
                read_unlock();
                if (!data)
                        data = new_data = get_data_from_pack(obj_entry);
@@ -1373,7 +1373,8 @@ static void fix_unresolved_deltas(struct hashfile *f)
 
                if (objects[d->obj_no].real_type != OBJ_REF_DELTA)
                        continue;
-               base_obj->data = read_sha1_file(d->oid.hash, &type, &base_obj->size);
+               base_obj->data = read_object_file(&d->oid, &type,
+                                                 &base_obj->size);
                if (!base_obj->data)
                        continue;