Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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 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;