aboutsummaryrefslogtreecommitdiff
path: root/connect.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2005-10-23 03:40:13 +0200
committerJunio C Hamano <junkio@cox.net>2005-10-24 15:13:37 -0700
commit40a10462498bdd23d4e49f02867b8be50eb78704 (patch)
tree5883a9965c79f5c5ac660d320d9155785ec7a805 /connect.c
parent69779a562a171d9b70bbb17b89e076bd6b16ae6c (diff)
downloadgit-40a10462498bdd23d4e49f02867b8be50eb78704.tar.gz
git-40a10462498bdd23d4e49f02867b8be50eb78704.tar.xz
git-fetch-pack: Implement client part of the multi_ack extension
This patch concludes the series, which makes git-fetch-pack/git-upload-pack negotiate a potentially better set of common revs. It should make a difference when fetching from a repository with a few branches. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/connect.c b/connect.c
index b171c5dbc..57e25a34b 100644
--- a/connect.c
+++ b/connect.c
@@ -59,8 +59,11 @@ int get_ack(int fd, unsigned char *result_sha1)
if (!strcmp(line, "NAK"))
return 0;
if (!strncmp(line, "ACK ", 3)) {
- if (!get_sha1_hex(line+4, result_sha1))
+ 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);
}