An instance for a custom backend
The backend API version
Queries the refdb backend for the existence of a reference.
A refdb implementation must provide this function.
Queries the refdb backend for a given reference.
A refdb implementation must provide this function.
Allocate an iterator object for the backend.
A refdb implementation must provide this function.
Writes the given reference to the refdb.
A refdb implementation must provide this function.
Rename a reference in the refdb.
A refdb implementation must provide this function.
Deletes the given reference from the refdb.
If it exists, its reflog should be deleted as well.
A refdb implementation must provide this function.
Suggests that the given refdb compress or optimize its references.
This mechanism is implementation specific. For on-disk reference databases, this may pack all loose references.
A refdb implementation may provide this function; if it is not provided, nothing will be done.
Query whether a particular reference has a log (may be empty)
Shall return 1 if it has a reflog, 0 it it doesn't and negative in case an error occurred.
A refdb implementation must provide this function.
Make sure a particular reference will have a reflog which will be appended to on writes.
A refdb implementation must provide this function.
Frees any resources held by the refdb (including the git_refdb_backend
itself).
A refdb backend implementation must provide this function.
Read the reflog for the given reference name.
A refdb implementation must provide this function.
Write a reflog to disk.
A refdb implementation must provide this function.
Rename a reflog.
A refdb implementation must provide this function.
Remove a reflog.
A refdb implementation must provide this function.
Lock a reference.
A refdb implementation may provide this function; if it is not provided, the transaction API will fail to work.
Unlock a reference.
Only one of target or symbolic_target will be set. success
will be true if the reference should be update, false if the lock must be discarded.
A refdb implementation must provide this function if a lock
implementation is provided.