Jonathan Nieder <jrnieder@xxxxxxxxx> writes: > Junio C Hamano wrote: >> Jonathan Nieder <jrnieder@xxxxxxxxx> writes: > >>> Shouldn't this use write_in_full() to avoid a silently truncated result? (*) >> >> Meaning this? If so, I think it makes sense. > [...] >> - if (xwrite(fd, out.buf, out.len) < 0) >> + if (write_in_full(fd, out.buf, out.len) != out.len) > > Yes. Either '< 0' or '!= out.len' would work fine here, since > write_in_full is defined to always either write the full 'count' > bytes or return an error. An unrelated tangent but we may want to fix majority of callers that do not seem to know that ;-) -- 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