Re: [PATCH v2 2/8] submodule--helper: get remote names from any repository
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 20, 2021, 21:28 UTC
- Message-ID
- <xmqqczp39bth.fsf@gitster.g>
- In-Reply-To
- <20210916103241.62376-3-raykar.ath@gmail.com>
Atharva Raykar <raykar.ath@gmail.com> writes:
Show 12 quoted lines
> +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.