diff options
| author | Vicent Martà <vicent@github.com> | 2013-09-04 06:20:36 -0700 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2013-09-04 06:20:36 -0700 |
| commit | e98535923b7f5aeaaaca3fbfbdf69da8f109b495 (patch) | |
| tree | 47296afac353b07da8ba1d3fbcd034d354aa3a19 /include | |
| parent | 74b38d199ebe74c25180e0baf4bf945c97cd3daf (diff) | |
| parent | b1a6c316a6070fac4ab1ec5792979838f7145c39 (diff) | |
| download | libgit2-e98535923b7f5aeaaaca3fbfbdf69da8f109b495.tar.gz | |
Merge pull request #1817 from libgit2/ntk/fix/backend/honor_refresh_capabilities
Of backends and refreshers...
Diffstat (limited to 'include')
| -rw-r--r-- | include/git2/sys/odb_backend.h | 10 |
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)( |
