builtin/reset: convert use of EMPTY_TREE_SHA1_BIN
[gitweb.git] / builtin / fsck.c
index 13c0a8048ece6bc21a5326f290432601b9f65486..3eb82ac44ffffd4665fa7ddb0b5b80420aa14ba2 100644 (file)
@@ -227,7 +227,7 @@ static void check_reachable_object(struct object *obj)
        if (!(obj->flags & HAS_OBJ)) {
                if (is_promisor_object(&obj->oid))
                        return;
-               if (has_sha1_pack(obj->oid.hash))
+               if (has_object_pack(&obj->oid))
                        return; /* it is in pack - forget about it */
                printf("missing %s %s\n", printable_type(obj),
                        describe_object(obj));
@@ -735,8 +735,6 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
                        uint32_t total = 0, count = 0;
                        struct progress *progress = NULL;
 
-                       prepare_packed_git();
-
                        if (show_progress) {
                                for (p = get_packed_git(the_repository); p;
                                     p = p->next) {