On Tue, Nov 26, 2024 at 09:48:49AM +0900, Junio C Hamano wrote: > Patrick Steinhardt <ps@xxxxxx> 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 <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. > 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