The loose ref db needs to loose its built-in namespace as it' won't work well in a multi-threaded context unless each thread has their own loose ref DB. The latter is possible, but will stop working once ref-table arrives. So we need to refactor.
Currently the loose ref DB is Sync, but only awkwardly usable due to its packed-buffer being outsourced into the callers responsibility.
git-repository works around this by putting packed-refs into a thread-local cache. The latter isn't optimal as it might well be shared across threads.
The new store should be Sync, be prepared for ref-table (and to unify both loose and ref under one API), and store packed-refs in a thread-safe fashion (if the feature is enabled in git-features, that is).
This is the architecture that was developed during the discovery in #259 .
https://github.com/Byron/gitoxide/blob/38e36a69f5fa6aae2f4cfee7faf11a10cea0f1d0/experiments/odb-redesign/src/lib.rs#L608-L676
Tasks
The loose ref db needs to loose its built-in namespace as it' won't work well in a multi-threaded context unless each thread has their own loose ref DB. The latter is possible, but will stop working once ref-table arrives. So we need to refactor.
Currently the loose ref DB is
Sync, but only awkwardly usable due to its packed-buffer being outsourced into the callers responsibility.git-repositoryworks around this by puttingpacked-refsinto a thread-local cache. The latter isn't optimal as it might well be shared across threads.The new store should be
Sync, be prepared forref-table(and to unify both loose and ref under one API), and store packed-refs in a thread-safe fashion (if the feature is enabled in git-features, that is).This is the architecture that was developed during the discovery in #259 .
https://github.com/Byron/gitoxide/blob/38e36a69f5fa6aae2f4cfee7faf11a10cea0f1d0/experiments/odb-redesign/src/lib.rs#L608-L676
Tasks
git-repositorypackedparameter accessible in a somewhat lower level method for those who build abstractions on top.link-gitofradicle-link- in progress - using mailing list based workflow. Now just a few patches without the upgrade, so nothing else to be done here.