Am I reading this incorrectly? It looks to me like if the first call to `pack_backend__read_internal` succeeds and returns 0 then this will still call `pack_backend__read_internal` a second time (and the same for the other functions with this pattern).  May just:

```c
int error =
    pack_backend__read_internal(buffer_p, len_p, type_p, backend, oid);

if (error == GIT_ENOTFOUND &&
    !(error = pack_backend__refresh(backend)))
    error = pack_backend__read_internal(buffer_p, len_p, type_p, backend, oid);

return error;
```

or something like that...

This points out that we probably need some success tests that also show that a successful non-refreshing lookup also only gets a read count of 1. I think that test would show a read count of 2 with the code as it is.