summaryrefslogtreecommitdiff
path: root/include/git2/sys/refdb_backend.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/sys/refdb_backend.h')
-rw-r--r--include/git2/sys/refdb_backend.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/git2/sys/refdb_backend.h b/include/git2/sys/refdb_backend.h
index aa5ef9ecc..dce142c77 100644
--- a/include/git2/sys/refdb_backend.h
+++ b/include/git2/sys/refdb_backend.h
@@ -159,6 +159,19 @@ struct git_refdb_backend {
#define GIT_REFDB_BACKEND_INIT {GIT_REFDB_BACKEND_VERSION}
/**
+ * Initializes a `git_refdb_backend` with default values. Equivalent to
+ * creating an instance with GIT_REFDB_BACKEND_INIT.
+ *
+ * @param opts the `git_refdb_backend` instance to initialize.
+ * @param version the version of the struct; you should pass
+ * `GIT_REFDB_BACKEND_VERSION` here.
+ * @return Zero on success; -1 on failure.
+ */
+GIT_EXTERN(int) git_refdb_init_backend(
+ git_refdb_backend* backend,
+ int version);
+
+/**
* Constructors for default filesystem-based refdb backend
*
* Under normal usage, this is called for you when the repository is