Re: [PATCH v2 2/8] submodule--helper: get remote names from any repository
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Sep 21, 2021, 16:33 UTC
- Message-ID
- <20210921163322.1640109-1-jonathantanmy@google.com>
- In-Reply-To
- <xmqqczp39bth.fsf@gitster.g>
Show 26 quoted lines
> Atharva Raykar <raykar.ath@gmail.com> writes:
>
> > +static char *get_default_remote_submodule(const char *module_path)
> > +{
> > + const char *refname;
> > + const struct submodule *sub;
> > + struct repository subrepo;
> > +
> > + refname = refs_resolve_ref_unsafe(get_submodule_ref_store(module_path),
> > + "HEAD", 0, NULL, NULL);
> > + sub = submodule_from_path(the_repository, null_oid(), module_path);
> > + repo_submodule_init(&subrepo, the_repository, sub);
> > + return repo_get_default_remote(&subrepo, refname);
> > +}
>
> This call (and I think there is another call in this file) to
> repo_submodule_init() is affected by what Jonathan's 8eb8dcf9
> (repository: support unabsorbed in repo_submodule_init, 2021-09-09)
> wants to do, namely to lose "struct submodule sub" as a parameter
> and instead take the path to the module and the treeish name as
> parameters to repo_submodule_init().
>
> I _think_ I resolved the conflict correctly, but please double check
> the result when it is pushed out later today, both of you.
>
> Thanks.Thanks for calling this out. There are indeed 2 such calls in 33cfc43433 ("Merge branch 'ar/submodule-update' into seen", 2021-09-20) and both look correct.