X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=connect.c;h=20054e4d0fd4cf94288593726be179d07d19271c;hb=68186857a9bb0a71e9456155623e02d398a5b817;hp=5145d1620c2f58cd6904b5957cbf2e1785f9de37;hpb=9aa5053d9ffc7fade885b58a34175b4907b1a4f8;p=git.git diff --git a/connect.c b/connect.c index 5145d1620..20054e4d0 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; @@ -636,11 +615,11 @@ struct child_process *git_connect(int fd[2], const char *url_orig, GIT_WORK_TREE_ENVIRONMENT, GRAFT_ENVIRONMENT, INDEX_ENVIRONMENT, + NO_REPLACE_OBJECTS_ENVIRONMENT, NULL }; conn->env = env; - *arg++ = "sh"; - *arg++ = "-c"; + conn->use_shell = 1; } *arg++ = cmd.buf; *arg = NULL;