Thread (1 message) 1 message, 1 author, 2025-09-24

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

From: Junio C Hamano <hidden>
Date: 2025-09-24 17:29:14

Phillip Wood [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help