Re: git: Wrong parsing of ssh urls with IPv6 literals ignores port
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 13, 2012, 17:21 UTC
- Message-ID
- <7v4nqfi0vz.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <4FD8C0F6.8060609@lsrfire.ath.cx>
René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
Show 23 quoted lines
> Am 12.06.2012 23:00, schrieb Jonathan Nieder: >> Jonathan Nieder wrote: >>> René Scharfe wrote: >> >>>> How about this instead? >>> >>> Looks good to me. >> >> Oh, hold on a second. Won't this get confused by >> >> ssh://[::1]/foo/bar/baz:80/qux >> >> ? > > It shouldn't, because the host part is NUL-terminated before > get_port() is called. Let's see (with the patch): > > $ git clone ssh://[::1]/foo/bar/baz:80/qux > Cloning into 'qux'... > ssh: connect to host ::1 port 22: Connection refused > fatal: The remote end hung up unexpectedly > > René
Yeah, I was wondering how that would get confused myself. Jonathan, ack again?