Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy

2016-02-24 Thread Junio C Hamano
Jonathan Nieder writes: > Stefan Beller wrote: >> On Wed, Feb 24, 2016 at 1:19 PM, Jonathan Nieder wrote: >> > Stefan Beller wrote: > When the callers of parallel processing machine are sloppy with their messages, make sure the output is terminated with LF after one child process

Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy

2016-02-24 Thread Jonathan Nieder
Stefan Beller wrote: > On Wed, Feb 24, 2016 at 1:19 PM, Jonathan Nieder wrote: > > Stefan Beller wrote: >>> When the callers of parallel processing machine are sloppy with their >>> messages, make sure the output is terminated with LF after one child >>> process is handled. >> >> Why not always a

Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy

2016-02-24 Thread Stefan Beller
On Wed, Feb 24, 2016 at 1:19 PM, Jonathan Nieder wrote: > Stefan Beller wrote: > >> When the callers of parallel processing machine are sloppy with their >> messages, make sure the output is terminated with LF after one child >> process is handled. > > Why not always add \n here? So you propose t

Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy

2016-02-24 Thread Junio C Hamano
Stefan Beller writes: > On Wed, Feb 24, 2016 at 12:07 PM, Junio C Hamano wrote: >> The inconsistency may not hurt as long as (1) the producers of the >> message will never stuff a NUL in the middle, and (2) strbuf always >> has the guard NUL after its contents. Even though we know that the >> l

Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy

2016-02-24 Thread Stefan Beller
On Wed, Feb 24, 2016 at 12:07 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> @@ -1095,9 +1098,11 @@ static void pp_buffer_stderr(struct >> parallel_processes *pp, int output_timeout) >> static void pp_output(struct parallel_processes *pp) >> { >> int i = pp->output_owner; >> -

Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy

2016-02-24 Thread Jonathan Nieder
Stefan Beller wrote: > When the callers of parallel processing machine are sloppy with their > messages, make sure the output is terminated with LF after one child > process is handled. Why not always add \n here? That would make callers simpler and would make it easier for callers to know what

Re: [PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy

2016-02-24 Thread Junio C Hamano
Stefan Beller writes: > @@ -1095,9 +1098,11 @@ static void pp_buffer_stderr(struct parallel_processes > *pp, int output_timeout) > static void pp_output(struct parallel_processes *pp) > { > int i = pp->output_owner; > - if (pp->children[i].state == GIT_CP_WORKING && > - pp->c

[PATCHv15 2/5] run_processes_parallel: add LF when caller is sloppy

2016-02-23 Thread Stefan Beller
When the callers of parallel processing machine are sloppy with their messages, make sure the output is terminated with LF after one child process is handled. This will not mess with the internal state of the output, i.e. after all messages for one child process are process including the callbacks