7.7
2.35 Refdb
(require libgit2/include/refdb) | package: libgit2 |
Constructors for default filesystem-based refdb backend
Under normal usage, this is called for you when the repository is opened / created, but you can use this to explicitly construct a filesystem refdb backend for a repository.
procedure
(git_refdb_compress refdb) → integer?
refdb : refdb?
Suggests that the given refdb compress or optimize its references. This mechanism is implementation specific. For on-disk reference databases, for example, this may pack all loose references.
procedure
(git_refdb_free refdb) → void?
refdb : refdb?
Close an open reference database.
procedure
(git_refdb_init_backend backend version) → integer?
backend : refdb_backend? version : integer?
Initializes a git_refdb_backend with default values. Equivalent to creating an instance with GIT_REFDB_BACKEND_INIT.
Create a new reference database with no backends.
Before the Ref DB can be used for read/writing, a custom database backend must be manually set using git_refdb_set_backend()
Create a new reference database and automatically add the default backends:
git_refdb_dir: read and write loose and packed refs from disk, assuming the repository dir as the folder
procedure
(git_refdb_set_backend refdb backend) → integer?
refdb : refdb? backend : refdb_backend?
Sets the custom backend to an existing reference DB
The git_refdb will take ownership of the git_refdb_backend so you should NOT free it after calling this function.