summaryrefslogtreecommitdiff
path: root/fsck.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2016-07-17 12:59:57 +0200
committerJunio C Hamano <gitster@pobox.com>2016-07-18 11:35:00 -0700
commit1cd772cc4124e43b14231dcaeae8a5dddf4ffdb9 (patch)
treeb2c194259ff773b03bc5a3f3921a8d595aef63da /fsck.c
parent7b35efd734e501f9e4692768a8b6aea818c0c93e (diff)
downloadgit-1cd772cc4124e43b14231dcaeae8a5dddf4ffdb9.tar.gz
fsck: give the error function a chance to see the fsck_options
We will need this in the next commit, where fsck will be taught to optionally name the objects when reporting issues about them. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fsck.c')
-rw-r--r--fsck.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fsck.c b/fsck.c
index 6ed90ec15e..828c5c6484 100644
--- a/fsck.c
+++ b/fsck.c
@@ -291,7 +291,7 @@ static int report(struct fsck_options *options, struct object *object,
va_start(ap, fmt);
strbuf_vaddf(&sb, fmt, ap);
- result = options->error_func(object, msg_type, sb.buf);
+ result = options->error_func(options, object, msg_type, sb.buf);
strbuf_release(&sb);
va_end(ap);
@@ -897,7 +897,8 @@ int fsck_object(struct object *obj, void *data, unsigned long size,
obj->type);
}
-int fsck_error_function(struct object *obj, int msg_type, const char *message)
+int fsck_error_function(struct fsck_options *o,
+ struct object *obj, int msg_type, const char *message)
{
if (msg_type == FSCK_WARN) {
warning("object %s: %s", oid_to_hex(&obj->oid), message);