rebase --rebase-merges: adjust man page for octopus support
[gitweb.git] / fsck.h
diff --git a/fsck.h b/fsck.h
index af3c84e8784d57ff68f13e2dbc8f19f940f1d9d4..c3cf5e00347bee21e161a558c6f3b8fbcad0be66 100644 (file)
--- a/fsck.h
+++ b/fsck.h
@@ -3,12 +3,14 @@
 
 #define FSCK_ERROR 1
 #define FSCK_WARN 2
+#define FSCK_IGNORE 3
 
 struct fsck_options;
 
 void fsck_set_msg_type(struct fsck_options *options,
                const char *msg_id, const char *msg_type);
 void fsck_set_msg_types(struct fsck_options *options, const char *values);
+int is_valid_msg_type(const char *msg_id, const char *msg_type);
 
 /*
  * callback function for fsck_walk
@@ -21,15 +23,19 @@ void fsck_set_msg_types(struct fsck_options *options, const char *values);
 typedef int (*fsck_walk_func)(struct object *obj, int type, void *data, struct fsck_options *options);
 
 /* callback for fsck_object, type is FSCK_ERROR or FSCK_WARN */
-typedef int (*fsck_error)(struct object *obj, int type, const char *message);
+typedef int (*fsck_error)(struct fsck_options *o,
+       struct object *obj, int type, const char *message);
 
-int fsck_error_function(struct object *obj, int type, const char *message);
+int fsck_error_function(struct fsck_options *o,
+       struct object *obj, int type, const char *message);
 
 struct fsck_options {
        fsck_walk_func walk;
        fsck_error error_func;
        unsigned strict:1;
        int *msg_type;
+       struct oid_array *skiplist;
+       struct decoration *object_names;
 };
 
 #define FSCK_OPTIONS_DEFAULT { NULL, fsck_error_function, 0, NULL }
@@ -47,4 +53,11 @@ int fsck_walk(struct object *obj, void *data, struct fsck_options *options);
 int fsck_object(struct object *obj, void *data, unsigned long size,
        struct fsck_options *options);
 
+/*
+ * Some fsck checks are context-dependent, and may end up queued; run this
+ * after completing all fsck_object() calls in order to resolve any remaining
+ * checks.
+ */
+int fsck_finish(struct fsck_options *options);
+
 #endif