Convert the verify_pack callback to struct object_id
[gitweb.git] / builtin / fsck.c
index 2f67e8217ec9588fe8ca5ab1fa6db41b907a8bed..a187054dac5731741be19c4e0f206323d3bd0acc 100644 (file)
@@ -377,7 +377,7 @@ static int fsck_obj(struct object *obj)
        return 0;
 }
 
-static int fsck_obj_buffer(const unsigned char *sha1, enum object_type type,
+static int fsck_obj_buffer(const struct object_id *oid, enum object_type type,
                           unsigned long size, void *buffer, int *eaten)
 {
        /*
@@ -385,10 +385,10 @@ static int fsck_obj_buffer(const unsigned char *sha1, enum object_type type,
         * verify_packfile(), data_valid variable for details.
         */
        struct object *obj;
-       obj = parse_object_buffer(sha1, type, size, buffer, eaten);
+       obj = parse_object_buffer(oid->hash, type, size, buffer, eaten);
        if (!obj) {
                errors_found |= ERROR_OBJECT;
-               return error("%s: object corrupt or missing", sha1_to_hex(sha1));
+               return error("%s: object corrupt or missing", oid_to_hex(oid));
        }
        obj->flags = HAS_OBJ;
        return fsck_obj(obj);