int (*)(void **, size_t *, git_otype *, git_odb_backend *, const git_oid *)
read
int (*)(git_oid *, void **, size_t *, git_otype *, git_odb_backend *, const git_oid *, size_t)
read_prefix
int (*)(size_t *, git_otype *, git_odb_backend *, const git_oid *)
read_header
int (*)(git_odb_backend *, const git_oid *, const void *, size_t, git_otype)
write
Write an object into the backend. The id of the object has already been calculated and is passed in.
int (*)(git_odb_stream **, git_odb_backend *, size_t, git_otype)
writestream
int (*)(git_odb_stream **, git_odb_backend *, const git_oid *)
readstream
int (*)(git_odb_backend *, const git_oid *)
exists
int (*)(git_odb_backend *)
refresh
If the backend implements a refreshing mechanism, it should be exposed through this endpoint. Each call to git_odb_refresh()
will invoke it.
However, the backend implementation should try to stay up-to-date as much as possible by itself as libgit2 will not automatically invoke git_odb_refresh()
. For instance, a potential strategy for the backend implementation to achieve this could be to internally invoke this endpoint on failed lookups (ie. exists()
, read()
, read_header()
).
int (*)(git_odb_backend *, git_odb_foreach_cb, void *)
foreach
int (*)(git_odb_writepack **, git_odb_backend *, git_odb *, git_transfer_progress_callback, void *)
writepack
void (*)(git_odb_backend *)
free