refdb: implement reftable backend

Implement the reftable backend that is used to read and write reftables.
The backend is not yet used anywhere after this commit.
This commit is contained in:
Patrick Steinhardt
2025-02-06 12:24:42 +01:00
parent 61c7ff026b
commit 6701e02f1c
6 changed files with 1939 additions and 1 deletions

View File

@@ -383,6 +383,21 @@ GIT_EXTERN(int) git_refdb_backend_fs(
git_refdb_backend **backend_out,
git_repository *repo);
/**
* Constructor for the reftable-based refdb backend
*
* Under normal usage, this is called for you when the repository is
* opened / created that uses the reftable format, but you can use this to
* explicitly construct a reftable refdb backend for a repository.
*
* @param backend_out Output pointer to the git_refdb_backend object
* @param repo Git repository to access
* @return 0 on success, <0 error code on failure
*/
GIT_EXTERN(int) git_refdb_backend_reftable(
git_refdb_backend **backend_out,
git_repository *repo);
/**
* Sets the custom backend to an existing reference DB
*