summaryrefslogtreecommitdiff
path: root/include/git2/sys/odb_backend.h
Commit message (Collapse)AuthorAgeFilesLines
* indexer: fix thin packsCarlos Martín Nieto2013-10-041-1/+1
| | | | | | When given an ODB from which to read objects, the indexer will attempt to inject the missing bases at the end of the pack and update the header and trailer to reflect the new contents.
* odb: Move the auto refresh logic to the pack backendnulltoken2013-09-041-0/+10
| | | | | | | | | | | | Previously, `git_object_read()`, `git_object_read_prefix()` and `git_object_exists()` were implementing an auto refresh logic. When the expected object couldn't be found in any backend, a call to `git_odb_refresh()` was triggered and the lookup was once again performed against all backends. This commit removes this auto-refresh logic from the odb layer and pushes it down into the pack-backend (as it's the only one currently exposing a `refresh()` endpoint).
* odb: document git_odb_streamCarlos Martín Nieto2013-08-171-0/+4
| | | | | | Clarify the role of each function and in particular mention that there is no need for the backend or stream to worry about the object's id, as it will be given when `finalize_write` is called.
* odb: make it clearer that the id is calculated in the frontendCarlos Martín Nieto2013-08-171-5/+1
| | | | | | | | | | The frontend is in charge of calculating the id of the objects. Thus the backends should treat it as a read-only value. The positioning in the function signature made it seem as though it was an output parameter. Make the id const and move it from the front to behind the subject (backend or stream).
* Move odb_backend implementors stuff into git2/sysRussell Belfer2013-04-211-0/+86
This moves some of the odb_backend stuff that is related to the internals of an odb_backend implementation into include/git2/sys. Some of the stuff related to streaming I left in include/git2 because it seemed like it would be reasonably needed by a normal user who wanted to stream objects into and out of the ODB. Also, I added APIs for traversing the list of backends so that some of the tests would not need to access ODB internals.