Re: What's cooking in git.git (Jun 2016, #01; Thu, 2)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 3, 2016, 15:59 UTC
- Message-ID
- <xmqq4m9aqn4d.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <57511086.40206@web.de>
Torsten Bögershausen <tboegi@web.de> writes:
Show 11 quoted lines
> There where 2 comments in the review. > The most important thing is that now > git://[example.com:123]/path/to/repo is valid, but it shouldn't. > This patch fixes it: > > @@ -673,7 +669,7 @@ static enum protocol parse_connect_url(const char *url_orig, char **ret_user, > * "host:port" and NULL. > * To support this undocumented legacy we still need to split the port. > */ > - if (!port) > + if (!port && protocol == PROTO_SSH)
Hmph, which one of these (if any) is valid, which ones aren't and why?
git://[example.com:123]/path/to/repo
ssh://[example.com:123]/path/to/repo
[example.com:123]:/path/to/repoI am wondering about the latter two, because both of them would become PROTO_SSH at some point in the codepath. And I am wondering about the first two, because they look the same at the syntactic level and if one is allowed the users would expect the other would also be (or vice versa).