> On Wed, Sep 15, 2021 at 12:41 AM Glen Choo <chooglen@xxxxxxxxxx> wrote: > > In the current state of affairs, the files ref store and the packed ref > > store seem to behave as a single logical ref database. An example of > > this (that I care about in particular) is in refs/files-backend.c where > > the files backend validates oids using the_repository's odb. > > refs/packed-backend.c doesn't do any such validation, and presumably > > just relies on the correctness of refs/files-backend.c. I assume that > > this also explains why some functions in refs_be_packed are stubs. > > The loose/packed storage is implemented in terms of files backend (the > public entry point) that defers to a packed backend in some cases. The > latter is implemented as a ref backend, but for no good reason. Yes, the packed backend doesn't need to be a ref backend. > I think Jonathan is right, but I also think that teasing apart the ref > backend and the ODB is premature until the ref backend itself is a > strongly enforced abstraction boundary. I think both efforts can proceed independently.