From: Patrick Steinhardt Date: Tue, 26 Nov 2024 06:41:00 GMT Subject: Re: [PATCH v3 4/9] refs/reftable: read references via `struct reftable_backend` Message-ID: In-Reply-To: On Tue, Nov 26, 2024 at 09:48:49AM +0900, Junio C Hamano wrote: > Patrick Steinhardt 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`. > All callers of read_ref_without_reload() now call > reftable_backend_read_ref(). > > The former took while the > latter take . They both take 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. > 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