mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
While we only support initializing repositories with the "files" reference backend right now, we are in the process of implementing a second backend with the "reftable" format. And while we already have the infrastructure to decide which format a repository should use when we open it, we do not have infrastructure yet to create new repositories with a different reference format. Introduce a new field `git_repository_init_options::refdb_type`. If unset, we'll default to the "files" backend. Otherwise though, if set to a valid `git_refdb_t`, we will use that new format to initialize the repostiory. Note that for now the only thing we do is to write the "refStorage" extension accordingly. What we explicitly don't yet do is to also handle the backend-specific logic to initialize the refdb on disk. This will be implemented in subsequent commits.