X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=connect.c;h=839a1037057d5224b4d35e0065168283d29f4cb2;hb=8a3c63e01d2b1df471beafff5fb78df4bade9388;hp=76e542776abff8d07e7250ecfc8c7ae813302b2d;hpb=749086fa090d81c10ebf16b1abfd138c3fa0232e;p=git.git diff --git a/connect.c b/connect.c index 76e542776..839a10370 100644 --- a/connect.c +++ b/connect.c @@ -107,27 +107,6 @@ int server_supports(const char *feature) strstr(server_capabilities, feature) != NULL; } -int get_ack(int fd, unsigned char *result_sha1) -{ - static char line[1000]; - int len = packet_read_line(fd, line, sizeof(line)); - - if (!len) - die("git fetch-pack: expected ACK/NAK, got EOF"); - if (line[len-1] == '\n') - line[--len] = 0; - if (!strcmp(line, "NAK")) - return 0; - if (!prefixcmp(line, "ACK ")) { - if (!get_sha1_hex(line+4, result_sha1)) { - if (strstr(line+45, "continue")) - return 2; - return 1; - } - } - die("git fetch_pack: expected ACK/NAK, got '%s'", line); -} - int path_match(const char *path, int nr, char **match) { int i; @@ -513,7 +492,7 @@ struct child_process *git_connect(int fd[2], const char *url_orig, signal(SIGCHLD, SIG_DFL); host = strstr(url, "://"); - if(host) { + if (host) { *host = '\0'; protocol = get_protocol(url); host += 3;