Subject: Re: [PATCH v5 12/13] xdiff: use enum macros NONE(0), SOME(1), TOO_MANY(2) in xprepare.c

From: Junio C Hamano <[email-masked]>
Date: Wed, 24 Sep 2025 10:29:12 -0700

Phillip Wood <[email-masked]> writes:

> Our coding guidelines say not to use "!!x" (I assume we're supposed to
> do "x != 0" instead) but in practice it's pretty common to see it in
> our codebase. I'd maybe try a (bool) cast and see what people say.

Offtopic.  I am perfectly fine to remove the "avoid !!x, as it is
too clever and confusing to others" entry from the guidelines.  As
we have many of them and it is a fairly well understood idiom in C,
I would imagine that it have become less confusing already since the
entry was written.

> Thanks for cleaning up the xdiff code, it is much appreciated

Hear, hear.