diff options
author | Mike Hommey <mh@glandium.org> | 2016-05-27 11:27:48 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-01 12:53:12 -0700 |
commit | e7c378e45ac6f59153db6c843ea2b8622015bee9 (patch) | |
tree | d7479a9600e1927adf7ffed36e644ebcbf883dda | |
parent | 3916adf9978b020f9a9b165f4c1c109046899560 (diff) | |
download | git-e7c378e45ac6f59153db6c843ea2b8622015bee9.tar.gz |
connect: document why we sometimes call get_port after get_host_and_port
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | connect.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -742,6 +742,13 @@ struct child_process *git_connect(int fd[2], const char *url, transport_check_allowed("ssh"); get_host_and_port(&ssh_host, &port); + /* + * get_host_and_port does not return a port in the + * [host:port]:path case. In that case, it is called + * with "[host:port]" and returns "host:port" and NULL. + * To support this undocumented legacy we still need + * to split the port. + */ if (!port) port = get_port(ssh_host); |