fsck: optionally ignore specific fsck issues completely
[gitweb.git] / fsck.c
diff --git a/fsck.c b/fsck.c
index a4205aaa5fe4f0b36a14d4377e505447890b45de..680f35eff0eca657af4aeb33caa496efcf6319af 100644 (file)
--- a/fsck.c
+++ b/fsck.c
@@ -131,6 +131,8 @@ static int parse_msg_type(const char *str)
                return FSCK_ERROR;
        else if (!strcmp(str, "warn"))
                return FSCK_WARN;
+       else if (!strcmp(str, "ignore"))
+               return FSCK_IGNORE;
        else
                die("Unknown fsck message type: '%s'", str);
 }
@@ -222,6 +224,9 @@ static int report(struct fsck_options *options, struct object *object,
        struct strbuf sb = STRBUF_INIT;
        int msg_type = fsck_msg_type(id, options), result;
 
+       if (msg_type == FSCK_IGNORE)
+               return 0;
+
        if (msg_type == FSCK_FATAL)
                msg_type = FSCK_ERROR;