Re: [PATCH v3 4/9] refs/reftable: read references via `struct reftable_backend`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Nov 26, 2024, 06:41 UTC
- Message-ID
- <Z0VtfJpOsMCEBuA_@pks.im>
- In-Reply-To
- <xmqq34je4y6m.fsf@gitster.g>
On Tue, Nov 26, 2024 at 09:48:49AM +0900, Junio C Hamano wrote:
Show 7 quoted lines
> Patrick Steinhardt <ps@pks.im> writes: > > > Refactor `read_ref_without_reload()` to accept a `struct reftable_stack` > > as input instead of accepting a `struct reftable_stack`. > > Hmph... am I supposed to be puzzled that the patch replaces A with > A?
Oops, no. The first one should of course be `struct reftable_backend`.
Show 11 quoted lines
> All callers of read_ref_without_reload() now call > reftable_backend_read_ref(). > > The former took <reftable_ref_store, reftable_stack> while the > latter take <reftable_backend>. They both take <refname, oid, > referent, type>, of course, because the former is replaced by the > latter. > > OK, so we introduce a new function, and instead of passing ref-store > and stack, the new function only takes reftable-backend (which has a > stack contained in it).
Yes.
Show 6 quoted lines
> The old function used ref-store only to find out the hash algorithm > via its base repository. Since the hash algorithm can be found from > the stack that is in the backend, the new function does not take a > ref-store. FWIW, the old function did not have to take one either, > but since we are getting rid of the old function altogether, that is > fine ;-)
You know, let me maybe split out this change into a separate commit. With your comments it's rather obvious that this commit does too many things at once.
Patrick