summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/sys/odb_backend.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/git2/sys/odb_backend.h b/include/git2/sys/odb_backend.h
index 31ffe1c33..4365906d4 100644
--- a/include/git2/sys/odb_backend.h
+++ b/include/git2/sys/odb_backend.h
@@ -64,6 +64,16 @@ struct git_odb_backend {
int (* exists)(
git_odb_backend *, const git_oid *);
+ /**
+ * 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 (* refresh)(git_odb_backend *);
int (* foreach)(