git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git: Wrong parsing of ssh urls with IPv6 literals ignores port

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Jun 13, 2012, 16:33 UTC
Message-ID
<4FD8C0F6.8060609@lsrfire.ath.cx>
In-Reply-To
<20120612210003.GA16816@burratino>
Am 12.06.2012 23:00, schrieb Jonathan Nieder:
Show 12 quoted lines
> 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é
Previous: Jonathan NiederNext: Junio C Hamano
Message 5 of 9 in “Re: git: Wrong parsing of ssh urls with IPv6 literals ignores port”
  1. Jonathan NiederJun 10, 2012
  2. René ScharfeJun 12, 2012
  3. Jonathan NiederJun 12, 2012
  4. Jonathan NiederJun 12, 2012
  5. René ScharfeJun 13, 2012
  6. Junio C HamanoJun 13, 2012
  7. Jonathan NiederJun 13, 2012
  8. Junio C HamanoJun 13, 2012
  9. Jonathan NiederJun 13, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.