On 7/14/07, Junio C Hamano <gitster@xxxxxxxxx> wrote:
"Marco Costalba" <mcostalba@xxxxxxxxx> writes: "size" is a bit vague here. What if we later want to extend things so that you can ask for the entire log entry size including the patch output part (I am not saying that would be an easy change --- I am more worried about the stability of the external interface). So is --show-"size". "message-size" would have been a bit easier to swallow, but I sense the problem runs deeper.
I'm rewriting the patch + documentation cleaned up and with a different option name (--show-log). 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). If it is not possible I have to give up in extending the scope of this 'show me the size' patch to diff content and I will stick to the proper name --show-log. Thanks Marco - 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