parse-options-cb: convert to struct object_id
[gitweb.git] / builtin / fsck.c
index f76e4163abbac825c00111504a040f8091d967d3..c40e14de658e399833a69225a04e93cd4ff27cc7 100644 (file)
@@ -599,10 +599,10 @@ static int fsck_cache_tree(struct cache_tree *it)
                fprintf(stderr, "Checking cache tree\n");
 
        if (0 <= it->entry_count) {
-               struct object *obj = parse_object(it->sha1);
+               struct object *obj = parse_object(it->oid.hash);
                if (!obj) {
                        error("%s: invalid sha1 pointer in cache-tree",
-                             sha1_to_hex(it->sha1));
+                             oid_to_hex(&it->oid));
                        errors_found |= ERROR_REFS;
                        return 1;
                }
@@ -771,6 +771,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
        }
 
        if (keep_cache_objects) {
+               verify_index_checksum = 1;
                read_cache();
                for (i = 0; i < active_nr; i++) {
                        unsigned int mode;