Subject: Re: [PATCH] submodule: add more exhaustive up-path testing

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Tue, 14 Aug 2018 23:16:30 +0200

On Tue, Aug 14 2018, Stefan Beller wrote:

> On Tue, Aug 14, 2018 at 2:05 PM Ævar Arnfjörð Bjarmason
> <[email-masked]> wrote:
>
>> > So ideally we'd also error out as soon as the host name is touched?
>>
>> Do we have some utility function that'll take whatever we have in
>> remote.<name>.url and spew out the username / host / path? We must,
>> since the clone protocol needs it, but I haven't found it.
>
> Nope. Welcome to the wonderful world of submodules.
> As submodules are in the transition state towards "in C",
> we could do some refactorings that would allow for easy access to
> these properties, but the transition is done via faithful conversion from
> shell to C, which did not have these functions either, but could just
> do some string hackery. And that is how we ended up with this
> function in the first place.

The remote/clone machinery is in C and so is the resolve-relative-url
helper. What's the missing bridge here?

Maybe we don't have that function yet, but we can presumably expose it,
and this seems unrelated to some other bits of submodules being in
shellscript.

No?