Skip to content

objectpool: Clarify lifetime of object pools by refactoring constructors

Patrick Steinhardt requested to merge pks-objectpool-improved-constructors into master

This MR refactors the constructors of git/objectpool to clarify the lifecycle of an object pool. It merges FromProto() and NewObjectPool(), removes Init() and refactors Create() to be a constructor instead of a receiver function.

This is a first step towards improved sanity checks in this area. Most importantly, I want to start rejecting creation of object pools in case the target exists as an empty directory and reject FromProto() and FromRepository() in case the object pool does not exist eventually.

Merge request reports