git: Wrong parsing of ssh urls with IPv6 literals ignores port
authorRené Scharfe <redacted>
Tue, 12 Jun 2012 18:46:56 +0000 (20:46 +0200)
committerJunio C Hamano <redacted>
Wed, 13 Jun 2012 20:10:55 +0000 (13:10 -0700)
commit7acf438215d1b0e8e47a707f3585de8486a2e5fe
treedd7b2535a9d3b4edae9a275558478f7ce76d7a49
parent121f71f0da1bc9a4e1e96be2c3e683191a82a354
git: Wrong parsing of ssh urls with IPv6 literals ignores port

If we encounter an address part shaped like "[HOST]:PORT", we skip the opening
bracket and replace the closing one with a NUL.  The variable host then points
to HOST and we've cut off the PORT part.  Thus, when we go looking for it using
host a bit later, we can't find it.  Start at end instead, which either points
to the colon, if present, or is equal to host.

Signed-off-by: Rene Scharfe <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
connect.c
git clone https://git.99rst.org/PROJECT