From: Junio C Hamano Date: Mon, 05 Mar 2018 22:09:51 GMT Subject: Re: [PATCH 2/2] add--interactive: detect bogus diffFilter output Message-ID: In-Reply-To: <878tb6nr6u.fsf@evledraar.gmail.com> Æ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 be undef, but your rewrite I think is wrong. The first "do the comparison only @colored is true" is not about definedness. It is "@colored can be an empty array when the user is not using separate 'show these colored lines to the end user, feed these noncolored lines to git-apply command' feature, so @colored==0 and @diff > 0 is perfectly fine".