Jeff King <peff@xxxxxxxx> writes: >> If the mechanism to do this were limited to the packet IO layer, it >> may be more palatable, though. > > Agreed. There's not a single place where we write, though, since we > often form packets in local buffers and then write() them out manually. > So it does have to be sprinkled around fetch-pack.c. But certainly the > damage can be limited to that client network code. Yeah, I do not mind "sprinkling all over the place in client network code" at all. The ideal is if we never used write_in_full() and always used this "write but if we get a write error then check for ERR packet" helper consistently (which means we'd convert all the writes done in that layer, and by definition that may have to be "all over the place in the client networking code"). Thanks.