diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-08-16 21:51:51 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-16 21:51:51 +0200 |
commit | b3d175409d9bfe005515ffe361e959fb9965111c (patch) | |
tree | 3227deea0e3191061f9b742687957adfb1ff3897 /refs.h | |
parent | The fifth batch (diff) | |
parent | fsck: add ref name check for files backend (diff) | |
download | git-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.h')
-rw-r--r-- | refs.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -4,6 +4,7 @@ #include "commit.h" #include "repository.h" +struct fsck_options; struct object_id; struct ref_store; struct strbuf; @@ -542,6 +543,13 @@ int refs_for_each_reflog(struct ref_store *refs, each_reflog_fn fn, void *cb_dat int check_refname_format(const char *refname, int flags); /* + * Check the reference database for consistency. Return 0 if refs and + * reflogs are consistent, and non-zero otherwise. The errors will be + * written to stderr. + */ +int refs_fsck(struct ref_store *refs, struct fsck_options *o); + +/* * Apply the rules from check_refname_format, but mutate the result until it * is acceptable, and place the result in "out". */ |