]> git.proxmox.com Git - libgit2.git/commit - include/git2/sys/odb_backend.h
odb: Move the auto refresh logic to the pack backend
authornulltoken <emeric.fermas@gmail.com>
Fri, 30 Aug 2013 15:36:00 +0000 (17:36 +0200)
committernulltoken <emeric.fermas@gmail.com>
Wed, 4 Sep 2013 05:44:53 +0000 (07:44 +0200)
commitb1a6c316a6070fac4ab1ec5792979838f7145c39
treeea5c22691963b8595622e40142ac2369d816a5f5
parent9b4ed214f484f22f127d7398467f45affcc014af
odb: Move the auto refresh logic to the pack backend

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).
include/git2/sys/odb_backend.h
src/odb.c
src/odb_pack.c