X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=connect.c;h=da89c9cfcf3469dfab789f2644f953ea46666e90;hb=f48fd68887a03756658a46486a5dd1301c5a655f;hp=5048653639b3eea4c68eaaa4382363b2bc468e06;hpb=12d6697f3a9f07db0c437438804aec994fc34035;p=git.git diff --git a/connect.c b/connect.c index 504865363..da89c9cfc 100644 --- a/connect.c +++ b/connect.c @@ -417,6 +417,8 @@ static int git_tcp_connect_sock(char *host) if (colon) { *colon = 0; port = colon + 1; + if (!*port) + port = ""; } memset(&hints, 0, sizeof(hints)); @@ -425,7 +427,7 @@ static int git_tcp_connect_sock(char *host) gai = getaddrinfo(host, port, &hints, &ai); if (gai) - die("Unable to look up %s (%s)", host, gai_strerror(gai)); + die("Unable to look up %s (port %s) (%s)", host, port, gai_strerror(gai)); for (ai0 = ai; ai; ai = ai->ai_next) { sockfd = socket(ai->ai_family,