Junio C Hamano <gitster@xxxxxxxxx> wrote: > One thing that I did not see mentioned in this thread is that the > implementation is allowed to buffer non-flush packets and send multiple of > them out with a single write(2). In other words, packet_write() could > buffer instead of directly calling safe_write(), while packet_flush() must > do safe_write() and make sure it drains. Good point. That's one reason why in JGit I call the flush packet of "0000" end(), and flush() triggers the drain. JGit buffers everything its writing, but only by one standard "have" window IIRC. JGit server code triggers a flush() after side-band channel 2 packet ends, but not an end(), because we only want to drain to the network, not inject a bad "0000" packet in the stream. -- Shawn. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html