Re: [PATCH v2] sequencer: fix edit handling for cherry-pick and revert messages
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 31, 2021, 18:01 UTC
- Message-ID
- <xmqqmtuj8ank.fsf@gitster.g>
- In-Reply-To
- <CABPp-BErXWkEOCyZtYP9AHd9eP2osL4s1xjMZ_BRkGSktdFnKg@mail.gmail.com>
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.