libgit2/libgit2 — pull request #2456 by carlosmn (2014-07-02 10:54:24+00:00)
Title: ssh: libssh2_channel_write() behaves like send()

When the stream writing function was written, it assume that
libssh2_channel_write() would always write all of the data to the
wire. This is only true for the first 32k of data, which it tries to
fit into one ssh packet.

Since it can perform short writes, call it in a loop like we do for
send(), advancing the buffer offset.

From #2454