Re: [PATCHv3] submodule--helper: normalize funny urls
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 20, 2016, 19:53 UTC
- Message-ID
- <xmqqvawmg5kh.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAGZ79kZyCXKnt9kTbnD8KrnsjJVb_7juW2epmdP9XqcRGfg=GA@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 10 quoted lines
> My thought was to fix it nevertheless, such that the url recorded as
> remote.origin.url is always the first case (no l or /. at the end).
>
> If we were to add this fix to clone, then it may be easier to debug
> submodule url schemes for users as the submodule url would then
> be a concatenation of remote.origin.url and the relative part.
>
> That seems easier to understand than ${remote.origin.url%%/.} +
> relative path, maybe? (Because then the user doesn't need to guess
> or remember historical behavior that is wrong on how this)Are you declaring that trailing / or /. will now be illegal? If you are declaring that, then I agree that new codepaths no longer have to worry about "strip / or /. before concatenating" and will simplify things for them. But otherwise, such a "fix" also would have an effect of hiding bugs from codepaths. They still need to be prepared to see any of the three variants and cope with them correctly, right?