checkout,clone: check return value of create_symref
[gitweb.git] / builtin / fsck.c
index 7bfb4938fb62da39a790425e34f88dfce6749c2b..55eac756f7c83e496daae7cb8874552caaa58ff5 100644 (file)
@@ -186,7 +186,7 @@ static void check_reachable_object(struct object *obj)
         * do a full fsck
         */
        if (!(obj->flags & HAS_OBJ)) {
-               if (has_sha1_pack(get_object_hash(*obj)))
+               if (has_sha1_pack(obj->oid.hash))
                        return; /* it is in pack - forget about it */
                if (connectivity_only && has_object_file(&obj->oid))
                        return;
@@ -249,7 +249,7 @@ static void check_unreachable_object(struct object *obj)
                        if (!(f = fopen(filename, "w")))
                                die_errno("Could not open '%s'", filename);
                        if (obj->type == OBJ_BLOB) {
-                               if (stream_blob_to_fd(fileno(f), get_object_hash(*obj), NULL, 1))
+                               if (stream_blob_to_fd(fileno(f), obj->oid.hash, NULL, 1))
                                        die_errno("Could not write '%s'", filename);
                        } else
                                fprintf(f, "%s\n", oid_to_hex(&obj->oid));