summaryrefslogtreecommitdiff
path: root/fetch-pack.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-05 22:44:09 (GMT)
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-05 22:44:09 (GMT)
commit41cb7488b9e5998ce1d665bbe10beca0a0f69c1c (patch)
tree5003dbc48bb4250e3984666787fc0bec0eb9b3af /fetch-pack.c
parent4f7770c87ce3c302e1639a7737a6d2531fe4b160 (diff)
downloadgit-41cb7488b9e5998ce1d665bbe10beca0a0f69c1c.zip
git-41cb7488b9e5998ce1d665bbe10beca0a0f69c1c.tar.gz
git-41cb7488b9e5998ce1d665bbe10beca0a0f69c1c.tar.bz2
Move "get_ack()" to common git_connect functions
git-clone-pack will want it too. Soon.
Diffstat (limited to 'fetch-pack.c')
-rw-r--r--fetch-pack.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index 96ce7f5..ec5bad8 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -6,24 +6,6 @@
static const char fetch_pack_usage[] = "git-fetch-pack [host:]directory [heads]* < mycommitlist";
static const char *exec = "git-upload-pack";
-static 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 (!strncmp(line, "ACK ", 3)) {
- if (!get_sha1_hex(line+4, result_sha1))
- return 1;
- }
- die("git-fetch_pack: expected ACK/NAK, got '%s'", line);
-}
-
static int find_common(int fd[2], unsigned char *result_sha1, unsigned char *remote)
{
static char line[1000];