From 922bc2253212cacdd865a93605b92aad0350bc94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Sat, 1 Oct 2011 14:34:51 +0200 Subject: [PATCH] pkt: send all of the wants in the negotiation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A missing if caused the function to return after the first want line without capabilities. Signed-off-by: Carlos Martín Nieto --- src/pkt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pkt.c b/src/pkt.c index 9b5a777b5..319a22e01 100644 --- a/src/pkt.c +++ b/src/pkt.c @@ -332,7 +332,9 @@ int git_pkt_send_wants(git_headarray *refs, git_transport_caps *caps, int fd) git_oid_fmt(buf + strlen(WANT_PREFIX), &head->oid); error = gitno_send(fd, buf, strlen(buf), 0); - return git__rethrow(error, "Failed to send want pkt"); + if (error < 0) { + return git__rethrow(error, "Failed to send want pkt"); + } } return git_pkt_send_flush(fd);