From: Johannes Schindelin Date: Mon, 1 Aug 2016 11:44:37 +0000 (+0200) Subject: merge-recursive: flush output buffer before printing error messages X-Git-Tag: v2.10.0-rc0~21^2~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/bc9204d4ef6e0672389fdfb0d398fa9a39dba3d5?ds=inline;hp=bc9204d4ef6e0672389fdfb0d398fa9a39dba3d5 merge-recursive: flush output buffer before printing error messages The data structure passed to the recursive merge machinery has a feature where the caller can ask for the output to be buffered into a strbuf, by setting the field 'buffer_output'. Previously, we died without flushing, losing accumulated output. With this patch, we show the output first, and only then print the error message. Currently, the only user of that buffering is merge_recursive() itself, to avoid the progress output to interfere. In the next patches, we will introduce a new buffer_output mode that forces merge_recursive() to retain the output buffer for further processing by the caller. If the caller asked for that, we will then also write the error messages into the output buffer. This is necessary to give the caller more control not only how to react in case of errors but also control how/if to display the error messages. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano ---