From ce6f8e7ec2bbebe2472e23b684cae0a4adf325ad Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 23 Jul 2005 11:10:21 -0700 Subject: Fix git protocol connection 'port' override It was broken by the IPv6 patches - we need to remove the ":" part from the hostname for a successful name lookup. --- connect.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'connect.c') diff --git a/connect.c b/connect.c index dcbbefa69f..a910af93d8 100644 --- a/connect.c +++ b/connect.c @@ -119,8 +119,10 @@ static int git_tcp_connect(int fd[2], const char *prog, char *host, char *path) end = host; colon = strchr(end, ':'); - if (colon) + if (colon) { + *colon = 0; port = colon + 1; + } memset(&hints, 0, sizeof(hints)); hints.ai_socktype = SOCK_STREAM; -- cgit v1.2.3