diff options
| author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-10-01 14:34:51 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-10-01 14:34:51 +0200 |
| commit | 922bc2253212cacdd865a93605b92aad0350bc94 (patch) | |
| tree | ea1a7a27e3487db95d358153df0905fd14b07aa8 /src/pkt.c | |
| parent | 7ad994bb6061779d3893f23fea43262d8eb24f0c (diff) | |
| download | libgit2-922bc2253212cacdd865a93605b92aad0350bc94.tar.gz | |
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>
Diffstat (limited to 'src/pkt.c')
| -rw-r--r-- | src/pkt.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |
