Re: [PATCH 2/2] add--interactive: detect bogus diffFilter output

2018-03-05 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 5, 2018 at 11:09 PM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> On Sat, Mar 03 2018, Jeff King jotted: >> >>> +if (@colored && @colored != @diff) { >> >> nit: should just be: >> >> if (@colored != @diff) { >> >> It's not

Re: [PATCH 2/2] add--interactive: detect bogus diffFilter output

2018-03-05 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > On Sat, Mar 03 2018, Jeff King jotted: > >> +if (@colored && @colored != @diff) { > > nit: should just be: > > if (@colored != @diff) { > > It's not possible for @arrays in scalar context to be undefined. It is true that @array can not

Re: [PATCH 2/2] add--interactive: detect bogus diffFilter output

2018-03-05 Thread Ævar Arnfjörð Bjarmason
On Sat, Mar 03 2018, Jeff King jotted: > + if (@colored && @colored != @diff) { nit: should just be: if (@colored != @diff) { It's not possible for @arrays in scalar context to be undefined.

Re: [PATCH 2/2] add--interactive: detect bogus diffFilter output

2018-03-05 Thread Jeff King
On Mon, Mar 05, 2018 at 12:53:07PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > It's important that the diff-filter only filter the > > individual lines, and that there remain a one-to-one mapping > > between the input and output lines. Otherwise, things like > >

Re: [PATCH 2/2] add--interactive: detect bogus diffFilter output

2018-03-05 Thread Junio C Hamano
Jeff King writes: > It's important that the diff-filter only filter the > individual lines, and that there remain a one-to-one mapping > between the input and output lines. Otherwise, things like > hunk-splitting will behave quite unexpectedly (e.g., you > think you are splitting

[PATCH 2/2] add--interactive: detect bogus diffFilter output

2018-03-02 Thread Jeff King
It's important that the diff-filter only filter the individual lines, and that there remain a one-to-one mapping between the input and output lines. Otherwise, things like hunk-splitting will behave quite unexpectedly (e.g., you think you are splitting at one point, but it has a different effect