summaryrefslogtreecommitdiff
path: root/connect.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-23 18:10:21 (GMT)
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-23 18:10:21 (GMT)
commitce6f8e7ec2bbebe2472e23b684cae0a4adf325ad (patch)
treefe3278fd4c785cfe3fe8e4e6edcf0a6869cad576 /connect.c
parent5ba884483fe1a5f9ce1ce5e3c5e1c37c0fd296c4 (diff)
downloadgit-ce6f8e7ec2bbebe2472e23b684cae0a4adf325ad.zip
git-ce6f8e7ec2bbebe2472e23b684cae0a4adf325ad.tar.gz
git-ce6f8e7ec2bbebe2472e23b684cae0a4adf325ad.tar.bz2
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.
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/connect.c b/connect.c
index dcbbefa..a910af9 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;