]> git.ipfire.org Git - thirdparty/git.git/commitdiff
fsck: drop unused fields from `struct fsck_ref_report`
authorPatrick Steinhardt <ps@pks.im>
Mon, 12 Jan 2026 09:02:57 +0000 (10:02 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Jan 2026 14:55:40 +0000 (06:55 -0800)
The `struct fsck_ref_report` has a couple fields that are intended to
improve the error reporting for broken ref reports by showing which
object ID or target reference the ref points to. These fields are never
set though and are thus essentially unused.

Remove them.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fsck.c
fsck.h

diff --git a/fsck.c b/fsck.c
index fae18d8561e0673bda4a627f5610bb5202991a83..813d927d57d4b04834b81e0c71ddfbe3d40d09bd 100644 (file)
--- a/fsck.c
+++ b/fsck.c
@@ -1310,11 +1310,6 @@ int fsck_refs_error_function(struct fsck_options *options UNUSED,
 
        strbuf_addstr(&sb, report->path);
 
-       if (report->oid)
-               strbuf_addf(&sb, " -> (%s)", oid_to_hex(report->oid));
-       else if (report->referent)
-               strbuf_addf(&sb, " -> (%s)", report->referent);
-
        if (msg_type == FSCK_WARN)
                warning("%s: %s", sb.buf, message);
        else
diff --git a/fsck.h b/fsck.h
index 336917c0451aacc74db1534d21f55ded0baeb8be..bfe0d9c6d2e44e2dffa025be5e361acd4da16e9e 100644 (file)
--- a/fsck.h
+++ b/fsck.h
@@ -162,8 +162,6 @@ struct fsck_object_report {
 
 struct fsck_ref_report {
        const char *path;
-       const struct object_id *oid;
-       const char *referent;
 };
 
 struct fsck_options {