[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [PATCH v2] sequencer: fix edit handling for cherry-pick and revert messages
From:       Junio C Hamano <gitster () pobox ! com>
Date:       2021-03-31 18:01:51
Message-ID: xmqqmtuj8ank.fsf () gitster ! g
[Download RAW message or body]

Elijah Newren <newren@gmail.com> writes:

> ... would you two prefer
> that I add a new affirm() function that is ALSO compiled out in
> production?

The reason I do not think affirm would fly is because it shares the
most problematic trait with assert(): it can be comipled out.

There was at least one bug we found and fixed in a piece of code
that came later in a codepath that had an assert() in it.  The buggy
code (IIRC, it was added way after the assert() was written in an
unrelated patch) was unknowingly depending on a side-effect of an
innocuous function call (i.e. assert(func_tion(args) == expected))
made in the assert condition, and the bug did not reproduce in the
developer's environment.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic