Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/fsck.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-10-18 07:58:40 +0300
committerJunio C Hamano <gitster@pobox.com>2019-10-28 08:05:18 +0300
commit5afc4b1dc622d574bcd67b5845789a0b5875431a (patch)
tree0f890ebb095a065683e67f963bc58f762520f684 /fsck.h
parent82ef89b318a3c88a3e6af21a05b75abf56d715da (diff)
fsck: only provide oid/type in fsck_error callback
None of the callbacks actually care about having a "struct object"; they're happy with just the oid and type information. So let's give ourselves more flexibility to avoid having a "struct object" by just passing the broken-down fields. Note that the callback already takes a "type" field for the fsck message type. We'll rename that to "msg_type" (and use "object_type" for the object type) to make the distinction explicit. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fsck.h')
-rw-r--r--fsck.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/fsck.h b/fsck.h
index 36cfa463af..69cf715e79 100644
--- a/fsck.h
+++ b/fsck.h
@@ -27,10 +27,12 @@ typedef int (*fsck_walk_func)(struct object *obj, int type, void *data, struct f
/* callback for fsck_object, type is FSCK_ERROR or FSCK_WARN */
typedef int (*fsck_error)(struct fsck_options *o,
- struct object *obj, int type, const char *message);
+ const struct object_id *oid, enum object_type object_type,
+ int msg_type, const char *message);
int fsck_error_function(struct fsck_options *o,
- struct object *obj, int type, const char *message);
+ const struct object_id *oid, enum object_type object_type,
+ int msg_type, const char *message);
struct fsck_options {
fsck_walk_func walk;