Re: [PATCH 05/16] refs: pass repo when retrieving submodule ref store
On Thu, May 16, 2024 at 11:44:17AM -0700, Junio C Hamano wrote:
Show 25 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
>
> > Modify the function to accept the parent repository as parameter and
> > move the global map into `struct repository`. Like this it becomes
> > possible to look up submodule ref stores for arbitrary repositories.
>
> Hmph.
>
> > diff --git a/refs.c b/refs.c
> > index 542acb25ff..86008ce7b4 100644
> > --- a/refs.c
> > +++ b/refs.c
> > @@ -1949,8 +1949,7 @@ int resolve_gitlink_ref(const char *submodule, const char *refname,
> > struct ref_store *refs;
> > int flags;
> >
> > - refs = get_submodule_ref_store(submodule);
> > -
> > + refs = repo_get_submodule_ref_store(the_repository, submodule);
> > if (!refs)
> > return -1;
>
> This still wants to work on the_repository, which means at this 5th
> step of 16-patch series, we cannot do a submodule of a submodule
> that hangs below the top-level superproject yet?
Yeah, this gets fixed in the next patch.
Patrick