Re: [RFC PATCH 1/2] refs: make _advance() check struct repo, not flag
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Sep 16, 2021, 17:24 UTC
- Message-ID
- <20210916172432.1073546-1-jonathantanmy@google.com>
- In-Reply-To
- <YUElL3RI0VTnjE5C@chooglen-macbookpro.roam.corp.google.com>
Show 10 quoted lines
> The answer to whether or not a ref store should refer to a certain > object store seems unresolved because a ref store is trying to do two > separate things. Perhaps it is reasonable to associate a ref database > with an object store (so that it can validate its refs), but we would > prefer to dissociate the physical ref storage layer from the object > store. (I'm paraphrasing Johnathan Nieder here, this isn't an original > thought). > > Perhaps this is a question we want to resolve when considering reftable > and other ref databases.
Either adding an explicit dependency on an object store to a ref store or dissociating it would be an improvement over what we have now, which is an implicit dependency on the_repository's object store. Of the two, I also prefer dissociating it. In practice, if I remember correctly, the part that checks object existence during ref writing is the last dependency, so if we can eliminate that without a convoluted design, I think it's worth dissociating.