Re: [PATCH 18/19] diff: buffer all output if asked to

2017-05-16 Thread Stefan Beller
On Mon, May 15, 2017 at 9:14 PM, Jonathan Tan wrote: > Overall, this patch seems larger than it should to me, although there > might be good reasons for that that I don't know. I'll remark on what > I find unexpected. > >> >> +static void

Re: [PATCH 18/19] diff: buffer all output if asked to

2017-05-15 Thread Jonathan Tan
Overall, this patch seems larger than it should to me, although there might be good reasons for that that I don't know. I'll remark on what I find unexpected. On Sat, May 13, 2017 at 9:01 PM, Stefan Beller wrote: > diff --git a/diff.c b/diff.c > index 08dcc56bb9..dbab7fb44e

Re: [PATCH 18/19] diff: buffer all output if asked to

2017-05-13 Thread Stefan Beller
On Sat, May 13, 2017 at 9:06 PM, Jeff King wrote: > On Sat, May 13, 2017 at 09:01:16PM -0700, Stefan Beller wrote: > >> + for (i = 0; i < o->line_buffer_nr; i++); >> + free((void*)o->line_buffer[i].line); > > I haven't looked at the patches yet, but

Re: [PATCH 18/19] diff: buffer all output if asked to

2017-05-13 Thread Jeff King
On Sat, May 13, 2017 at 09:01:16PM -0700, Stefan Beller wrote: > + for (i = 0; i < o->line_buffer_nr; i++); > + free((void*)o->line_buffer[i].line); I haven't looked at the patches yet, but this ";" on the for line is almost certainly a typo (gcc catches it due to

[PATCH 18/19] diff: buffer all output if asked to

2017-05-13 Thread Stefan Beller
Introduce a new option 'use_buffer' in the struct diff_options which controls whether all output is buffered up until all output is available. We'll have two new structs in diff.h, one of them 'buffered_patch_line' will be used to buffer each line, and the other 'buffered_patch_file_pair' will