summaryrefslogtreecommitdiffstats
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-08-16 21:51:51 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-16 21:51:51 +0200
commitb3d175409d9bfe005515ffe361e959fb9965111c (patch)
tree3227deea0e3191061f9b742687957adfb1ff3897 /refs.c
parentThe fifth batch (diff)
parentfsck: add ref name check for files backend (diff)
downloadgit-b3d175409d9bfe005515ffe361e959fb9965111c.tar.xz
git-b3d175409d9bfe005515ffe361e959fb9965111c.zip
Merge branch 'sj/ref-fsck'
"git fsck" infrastructure has been taught to also check the sanity of the ref database, in addition to the object database. * sj/ref-fsck: fsck: add ref name check for files backend files-backend: add unified interface for refs scanning builtin/refs: add verify subcommand refs: set up ref consistency check infrastructure fsck: add refs report function fsck: add a unified interface for reporting fsck messages fsck: make "fsck_error" callback generic fsck: rename objects-related fsck error functions fsck: rename "skiplist" to "skip_oids"
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/refs.c b/refs.c
index 0d9ba93cf6..74de3d3009 100644
--- a/refs.c
+++ b/refs.c
@@ -316,6 +316,11 @@ int check_refname_format(const char *refname, int flags)
return check_or_sanitize_refname(refname, flags, NULL);
}
+int refs_fsck(struct ref_store *refs, struct fsck_options *o)
+{
+ return refs->be->fsck(refs, o);
+}
+
void sanitize_refname_component(const char *refname, struct strbuf *out)
{
if (check_or_sanitize_refname(refname, REFNAME_ALLOW_ONELEVEL, out))