aboutsummaryrefslogtreecommitdiffstats
path: root/refs/refs-internal.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-08-16 12:51:51 -0700
committerJunio C Hamano <gitster@pobox.com>2024-08-16 12:51:51 -0700
commitb3d175409d9bfe005515ffe361e959fb9965111c (patch)
tree3227deea0e3191061f9b742687957adfb1ff3897 /refs/refs-internal.h
parent87a1768b93a67d0420255a43d9e07387b2e805ad (diff)
parent1c31be45b3b263670c7d2a91c27cc119b77dd2e2 (diff)
downloadgit-b3d175409d9bfe005515ffe361e959fb9965111c.tar.gz
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/refs-internal.h')
-rw-r--r--refs/refs-internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index 390a2ab001..2313c830d8 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -4,6 +4,7 @@
#include "refs.h"
#include "iterator.h"
+struct fsck_options;
struct ref_transaction;
/*
@@ -651,6 +652,9 @@ typedef int read_raw_ref_fn(struct ref_store *ref_store, const char *refname,
typedef int read_symbolic_ref_fn(struct ref_store *ref_store, const char *refname,
struct strbuf *referent);
+typedef int fsck_fn(struct ref_store *ref_store,
+ struct fsck_options *o);
+
struct ref_storage_be {
const char *name;
ref_store_init_fn *init;
@@ -678,6 +682,8 @@ struct ref_storage_be {
create_reflog_fn *create_reflog;
delete_reflog_fn *delete_reflog;
reflog_expire_fn *reflog_expire;
+
+ fsck_fn *fsck;
};
extern struct ref_storage_be refs_be_files;