Re: [PATCH v5 14/16] merge-recursive: offer an option to retain the output in 'obuf'

2016-08-02 Thread Junio C Hamano
Johannes Schindelin writes: >> But in that case, there would be both messages meant for the >> standard output and also meant for the standard error, and we need >> some way to make sure they go to the right channel. > > Not necessarily. Let's have a look at our

Re: [PATCH v5 14/16] merge-recursive: offer an option to retain the output in 'obuf'

2016-08-01 Thread Junio C Hamano
Johannes Schindelin writes: >> I actually now see how this would work well for "reason 2)". If a >> caller wants to run the function and wants to pretend as if it did >> not run anything when it failed, for example, using this to spool >> all output and error to a

Re: [PATCH v5 14/16] merge-recursive: offer an option to retain the output in 'obuf'

2016-08-01 Thread Johannes Schindelin
Hi Junio, On Wed, 27 Jul 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > diff --git a/merge-recursive.h b/merge-recursive.h > > index d415724..340704c 100644 > > --- a/merge-recursive.h > > +++ b/merge-recursive.h > > @@ -13,7 +13,7 @@ struct

Re: [PATCH v5 14/16] merge-recursive: offer an option to retain the output in 'obuf'

2016-08-01 Thread Johannes Schindelin
Hi Junio, On Wed, 27 Jul 2016, Junio C Hamano wrote: > Junio C Hamano writes: > > > I am not yet sure if it makes sense to mix both the regular output > > and an error into the same buffer for the callers to process (your > > "reason 1)" above), and this looks like a wrong

Re: [PATCH v5 14/16] merge-recursive: offer an option to retain the output in 'obuf'

2016-07-27 Thread Junio C Hamano
Junio C Hamano writes: > I am not yet sure if it makes sense to mix both the regular output > and an error into the same buffer for the callers to process (your > "reason 1)" above), and this looks like a wrong way to allow a > caller that wants no output (your "reason 2)"

Re: [PATCH v5 14/16] merge-recursive: offer an option to retain the output in 'obuf'

2016-07-27 Thread Junio C Hamano
Johannes Schindelin writes: > 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

[PATCH v5 14/16] merge-recursive: offer an option to retain the output in 'obuf'

2016-07-26 Thread Johannes Schindelin
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