* response does not necessarily mean an ACL problem, though.
*/
if (unexpected)
- die(_("The remote end hung up upon initial contact"));
+ die(_("the remote end hung up upon initial contact"));
else
die(_("Could not read from remote repository.\n\n"
"Please make sure you have the correct access rights\n"
static void check_no_capabilities(const char *line, int len)
{
if (strlen(line) != len)
- warning("Ignoring capabilities after first line '%s'",
+ warning("ignoring capabilities after first line '%s'",
line + strlen(line));
}
return PROTO_SSH;
if (!strcmp(name, "file"))
return PROTO_FILE;
- die("I don't handle protocol '%s'", name);
+ die("protocol '%s' is not supported", name);
}
static char *host_end(char **hoststart, int removebrackets)
int ka = 1;
if (setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, &ka, sizeof(ka)) < 0)
- fprintf(stderr, "unable to set SO_KEEPALIVE on socket: %s\n",
- strerror(errno));
+ error_errno("unable to set SO_KEEPALIVE on socket");
}
#ifndef NO_IPV6
gai = getaddrinfo(host, port, &hints, &ai);
if (gai)
- die("Unable to look up %s (port %s) (%s)", host, port, gai_strerror(gai));
+ die("unable to look up %s (port %s) (%s)", host, port, gai_strerror(gai));
if (flags & CONNECT_VERBOSE)
fprintf(stderr, "done.\nConnecting to %s (port %s) ... ", host, port);
enable_keepalive(sockfd);
if (flags & CONNECT_VERBOSE)
- fprintf(stderr, "done.\n");
+ fprintf_ln(stderr, "done.");
strbuf_release(&error_message);
he = gethostbyname(host);
if (!he)
- die("Unable to look up %s (%s)", host, hstrerror(h_errno));
+ die("unable to look up %s (%s)", host, hstrerror(h_errno));
nport = strtoul(port, &ep, 10);
if ( ep == port || *ep ) {
/* Not numeric */
struct servent *se = getservbyname(port,"tcp");
if ( !se )
- die("Unknown port %s", port);
+ die("unknown port %s", port);
nport = se->s_port;
}
enable_keepalive(sockfd);
if (flags & CONNECT_VERBOSE)
- fprintf(stderr, "done.\n");
+ fprintf_ln(stderr, "done.");
return sockfd;
}
path = strchr(end, separator);
if (!path || !*path)
- die("No path specified. See 'man git-pull' for valid url syntax");
+ die("no path specified; see 'git help pull' for valid url syntax");
/*
* null-terminate hostname and point path to ~ for URL's like this: