Re: [PATCH 1/2] submodule: ignore trailing slash on superproject URL
- From
Dennis Kaarsemaker <dennis@kaarsemaker.net>
- Date
- Oct 10, 2016, 19:58 UTC
- Message-ID
- <1476129516.7457.6.camel@kaarsemaker.net>
- In-Reply-To
- <20161010175611.1058-1-sbeller@google.com>
[And now with CC to the list, sorry Stefan]
On Mon, 2016-10-10 at 10:56 -0700, Stefan Beller wrote:
Show 12 quoted lines
> Before 63e95beb0 (2016-04-15, submodule: port resolve_relative_url from
> shell to C), it did not matter if the superprojects URL had a trailing
> slash or not. It was just chopped off as one of the first steps
> (The "remoteurl=${remoteurl%/}" near the beginning of
> resolve_relative_url(), which was removed in said commit).
>
> When porting this to the C version, an off-by-one error was introduced
> and we did not check the actual last character to be a slash, but the
> NULL delimiter.
>
> Reintroduce the behavior from before 63e95beb0, to ignore the trailing
> slash.Looks good to me, and fixes my simple testcase and cloning epiphany with trailing slash. Thanks!
D.