]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/mktag.c
Merge branch 'en/ort-perf-batch-9'
[thirdparty/git.git] / builtin / mktag.c
index 41a399a69e4c08d3ab16274b7e8523e8a96ee3c6..dddcccdd368328261db51d47b3b5a7b444fbaca5 100644 (file)
@@ -14,15 +14,12 @@ static int option_strict = 1;
 
 static struct fsck_options fsck_options = FSCK_OPTIONS_STRICT;
 
-static int mktag_config(const char *var, const char *value, void *cb)
-{
-       return fsck_config_internal(var, value, cb, &fsck_options);
-}
-
 static int mktag_fsck_error_func(struct fsck_options *o,
                                 const struct object_id *oid,
                                 enum object_type object_type,
-                                int msg_type, const char *message)
+                                enum fsck_msg_type msg_type,
+                                enum fsck_msg_id msg_id,
+                                const char *message)
 {
        switch (msg_type) {
        case FSCK_WARN:
@@ -91,9 +88,10 @@ int cmd_mktag(int argc, const char **argv, const char *prefix)
                die_errno(_("could not read from stdin"));
 
        fsck_options.error_func = mktag_fsck_error_func;
-       fsck_set_msg_type(&fsck_options, "extraheaderentry", "warn");
+       fsck_set_msg_type_from_ids(&fsck_options, FSCK_MSG_EXTRA_HEADER_ENTRY,
+                                  FSCK_WARN);
        /* config might set fsck.extraHeaderEntry=* again */
-       git_config(mktag_config, NULL);
+       git_config(git_fsck_config, &fsck_options);
        if (fsck_tag_standalone(NULL, buf.buf, buf.len, &fsck_options,
                                &tagged_oid, &tagged_type))
                die(_("tag on stdin did not pass our strict fsck check"));