Thread (13 messages) 13 messages, 4 authors, 2016-12-22

Re: [PATCH] mailinfo.c: move side-effects outside of assert

flat view

From: Jeff King <hidden>
Date: 2016-12-22 03:59:31

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help