Skip to content

Commit 3993e9a

Browse files
committed
Update documentation for ODB backend refresh logic
Commit b1a6c31 moved auto-refresh into the pack backend, and added a comment accordingly. Commit 43820f2 moved auto-refresh back *out* of backends into the ODB layer, but didn't update the comment.
1 parent 358a60e commit 3993e9a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

include/git2/sys/odb_backend.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,8 @@ struct git_odb_backend {
6969
* If the backend implements a refreshing mechanism, it should be exposed
7070
* through this endpoint. Each call to `git_odb_refresh()` will invoke it.
7171
*
72-
* However, the backend implementation should try to stay up-to-date as much
73-
* as possible by itself as libgit2 will not automatically invoke
74-
* `git_odb_refresh()`. For instance, a potential strategy for the backend
75-
* implementation to achieve this could be to internally invoke this
76-
* endpoint on failed lookups (ie. `exists()`, `read()`, `read_header()`).
72+
* The odb layer will automatically call this when needed on failed
73+
* lookups (ie. `exists()`, `read()`, `read_header()`).
7774
*/
7875
int GIT_CALLBACK(refresh)(git_odb_backend *);
7976

0 commit comments

Comments
 (0)