From 6fb5acfd8f7102f53dedc887233313f233a65932 Mon Sep 17 00:00:00 2001 From: David Turner Date: Sun, 4 Sep 2016 18:08:41 +0200 Subject: refs: add methods to init refs db Alternate refs backends might not need the refs/heads directory and so on, so we make ref db initialization part of the backend. Signed-off-by: David Turner Signed-off-by: Junio C Hamano Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- refs/refs-internal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'refs/refs-internal.h') diff --git a/refs/refs-internal.h b/refs/refs-internal.h index ade65010d4..b3a20955c3 100644 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@ -479,6 +479,8 @@ struct ref_store; */ typedef struct ref_store *ref_store_init_fn(const char *submodule); +typedef int ref_init_db_fn(struct ref_store *refs, struct strbuf *err); + typedef int ref_transaction_commit_fn(struct ref_store *refs, struct ref_transaction *transaction, struct strbuf *err); @@ -583,6 +585,7 @@ struct ref_storage_be { struct ref_storage_be *next; const char *name; ref_store_init_fn *init; + ref_init_db_fn *init_db; ref_transaction_commit_fn *transaction_commit; ref_transaction_commit_fn *initial_transaction_commit; -- cgit v1.2.3