From: Jeff King Date: Thu, 22 Dec 2016 03:59:23 GMT Subject: Re: [PATCH] mailinfo.c: move side-effects outside of assert Message-ID: <20161222035923.chgdv7pcbzevihhm@sigill.intra.peff.net> In-Reply-To: <99C4A905-D66B-4609-9E55-06F9BC301C74@gmail.com> On Wed, Dec 21, 2016 at 07:53:15PM -0800, Kyle J. McKay wrote: > It seems to me what you are saying is that Git's "assert" calls are > DIAGNOSTIC and therefore belong in a release build -- well, except for the > nedmalloc "assert" calls which do not. Yes, I think that is a good way of thinking about it (modulo that I really can't say one way or the other about nedmalloc's uses). There _are_ some DEBUG-type things in Git that are protected by #ifdefs that default to "off" (grep for DIFF_DEBUG, for instance). I'm actually of the opinion that debugging code like that should be in all builds and triggerable at run-time, provided it carries no significant performance penalty when the run-time switch is not enabled. But I do agree that's a totally separate question than from your DEBUG/DIAGNOSTIC distinction. -Peff