check_everything_connected: use a struct with named options
[gitweb.git] / builtin / unpack-objects.c
index 61a3378896708694ecaef3b4e593bf266c622c16..172470bf241e4da731c5741567555d7e01691c74 100644 (file)
@@ -194,7 +194,7 @@ static int check_object(struct object *obj, int type, void *data, struct fsck_op
 
        if (!(obj->flags & FLAG_OPEN)) {
                unsigned long size;
-               int type = sha1_object_info(get_object_hash(*obj), &size);
+               int type = sha1_object_info(obj->oid.hash, &size);
                if (type != obj->type || type <= 0)
                        die("object of unexpected type");
                obj->flags |= FLAG_WRITTEN;
@@ -355,7 +355,7 @@ static void unpack_delta_entry(enum object_type type, unsigned long delta_size,
                        return; /* we are done */
                else {
                        /* cannot resolve yet --- queue it */
-                       hashcpy(obj_list[nr].sha1, null_sha1);
+                       hashclr(obj_list[nr].sha1);
                        add_delta_to_list(nr, base_sha1, 0, delta_data, delta_size);
                        return;
                }
@@ -406,7 +406,7 @@ static void unpack_delta_entry(enum object_type type, unsigned long delta_size,
                         * The delta base object is itself a delta that
                         * has not been resolved yet.
                         */
-                       hashcpy(obj_list[nr].sha1, null_sha1);
+                       hashclr(obj_list[nr].sha1);
                        add_delta_to_list(nr, null_sha1, base_offset, delta_data, delta_size);
                        return;
                }