Commit 922bc225 by Carlos Martín Nieto

pkt: send all of the wants in the negotiation

A missing if caused the function to return after the first want line
without capabilities.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
parent 7ad994bb
...@@ -332,8 +332,10 @@ int git_pkt_send_wants(git_headarray *refs, git_transport_caps *caps, int fd) ...@@ -332,8 +332,10 @@ int git_pkt_send_wants(git_headarray *refs, git_transport_caps *caps, int fd)
git_oid_fmt(buf + strlen(WANT_PREFIX), &head->oid); git_oid_fmt(buf + strlen(WANT_PREFIX), &head->oid);
error = gitno_send(fd, buf, strlen(buf), 0); error = gitno_send(fd, buf, strlen(buf), 0);
if (error < 0) {
return git__rethrow(error, "Failed to send want pkt"); return git__rethrow(error, "Failed to send want pkt");
} }
}
return git_pkt_send_flush(fd); return git_pkt_send_flush(fd);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment