diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-04-27 12:23:53 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-04-27 12:23:54 -0700 |
commit | ad34ad614da30387c82a54c7087705050b4de441 (patch) | |
tree | 998a6766aec9e4b9076a5a48c3f2fb64a1d2bdb4 /connect.c | |
parent | 89ba311df399d27a962b273e1acd95a38af2c821 (diff) | |
parent | 6b6c5f7a2f66751a93afce54277a1f30ab0dc521 (diff) | |
download | git-ad34ad614da30387c82a54c7087705050b4de441.tar.gz |
Merge branch 'tb/connect-ipv6-parse-fix' into maint
An earlier update to the parser that disects a URL broke an
address, followed by a colon, followed by an empty string (instead
of the port number), e.g. ssh://example.com:/path/to/repo.
* tb/connect-ipv6-parse-fix:
connect.c: ignore extra colon after hostname
Diffstat (limited to 'connect.c')
-rw-r--r-- | connect.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -310,6 +310,8 @@ static void get_host_and_port(char **host, const char **port) if (end != colon + 1 && *end == '\0' && 0 <= portnr && portnr < 65536) { *colon = 0; *port = colon + 1; + } else if (!colon[1]) { + *colon = 0; } } } |