Re: [PATCH v6 1/9] connect: call get_host_and_port() earlier

2016-05-20 Thread Mike Hommey
On Fri, May 20, 2016 at 03:20:23PM -0700, Junio C Hamano wrote: > Mike Hommey writes: > > >> Can never happen because? > >> > >> !*port means get_host_and_port() made the "port" pointer point at > >> a NUL byte. That does not happen because the only case port is > >>

Re: [PATCH v6 1/9] connect: call get_host_and_port() earlier

2016-05-20 Thread Junio C Hamano
Mike Hommey writes: >> Can never happen because? >> >> !*port means get_host_and_port() made the "port" pointer point at >> a NUL byte. That does not happen because the only case port is >> moved by that function is to have it point at a byte after we >> found ':',

Re: [PATCH v6 1/9] connect: call get_host_and_port() earlier

2016-05-20 Thread Mike Hommey
On Fri, May 20, 2016 at 01:58:26PM -0700, Junio C Hamano wrote: > Mike Hommey writes: > > > Currently, get_host_and_port() is called in git_connect() for the ssh > > protocol, and in git_tcp_connect_sock() for the git protocol. Instead > > of doing this, just call it from a

Re: [PATCH v6 1/9] connect: call get_host_and_port() earlier

2016-05-20 Thread Junio C Hamano
Mike Hommey writes: > Currently, get_host_and_port() is called in git_connect() for the ssh > protocol, and in git_tcp_connect_sock() for the git protocol. Instead > of doing this, just call it from a single place, right after > parse_connect_url(), and pass the host and port

[PATCH v6 1/9] connect: call get_host_and_port() earlier

2016-05-16 Thread Mike Hommey
Currently, get_host_and_port() is called in git_connect() for the ssh protocol, and in git_tcp_connect_sock() for the git protocol. Instead of doing this, just call it from a single place, right after parse_connect_url(), and pass the host and port separately to git_*_connect() functions. We