]> git.ipfire.org Git - thirdparty/git.git/commit - merge-recursive.c
merge-recursive: offer an option to retain the output in 'obuf'
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 1 Aug 2016 11:44:50 +0000 (13:44 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Aug 2016 18:45:30 +0000 (11:45 -0700)
commitf1e2426b28399b563527d110c849acd65b680de6
tree5419f5c03468624bee5005f86929e93cdc7c7d7a
parentdde75cb0561fa8a6bbb2de4c3662dbcc33728938
merge-recursive: offer an option to retain the output in 'obuf'

Since 66a155b (Enable output buffering in merge-recursive., 2007-01-14),
we already accumulate the output in a buffer. The idea was to avoid
interfering with the progress output that goes to stderr, which is
unbuffered, when we write to stdout, which is buffered.

We extend that buffering to allow the caller to handle the output
(possibly suppressing it). This will help us when extending the
sequencer to do rebase -i's brunt work: it does not want the picks to
print anything by default but instead determine itself whether to print
the output or not.

Note that we also redirect the error messages into the output buffer
when the caller asked not to flush the output buffer, for two reasons:
1) to retain the correct output order, and 2) to allow the caller to
suppress *all* output.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c
merge-recursive.h