"Alex Riesen" <raa.lkml@xxxxxxxxx> writes: > On 7/16/07, Marco Costalba <mcostalba@xxxxxxxxx> wrote: >> Currently the patch just include the log message because the diff >> content (-p option) is not buffered but is written with a combination >> of printf, puts, fputs, fwrite and putchar directly to stdout. >> >> My question is, there is a way to get the quantity of bytes written to >> stdout before they are printed? I'm not an expert of C stdio library, >> so perhaps this is nonsense, but I was thinking of reading the size of >> stout buffer before to fflush() (I don't know if it is possible). > > It is not possible. Buffers can be flushed at any time (i.e. they are > flushed when EOL reached and the output is a terminal for stdout). > > It is also a bit unclear _why_ do you need the diff output. You don't > show it immediately anyway. I'd say making --show-message-size option incompatible with diff output would be good enough futureproofing for now. - 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