fetch-pack: add --no-filter
[gitweb.git] / builtin / fsck.c
index 4c2a56d0c2aba78eed7234aee600e52f16bdd275..3b76c0ef0f4beddd2af5500aa435ea67ebf573e7 100644 (file)
@@ -678,6 +678,9 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
        int i;
        struct alternate_object_database *alt;
 
+       /* fsck knows how to handle missing promisor objects */
+       fetch_if_missing = 0;
+
        errors_found = 0;
        check_replace_refs = 0;
 
@@ -750,6 +753,8 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
                        struct object *obj = lookup_object(oid.hash);
 
                        if (!obj || !(obj->flags & HAS_OBJ)) {
+                               if (is_promisor_object(&oid))
+                                       continue;
                                error("%s: object missing", oid_to_hex(&oid));
                                errors_found |= ERROR_OBJECT;
                                continue;