Re: [Question] check_repository_format_gently() is not side-effect-free
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 19, 2026, 18:07 UTC
- Message-ID
- <xmqqfr5vlmlu.fsf@gitster.g>
- In-Reply-To
- <c0bb931a-3ee6-416b-8ceb-9fab013a621e@malon.dev>
Tian Yuchen <cat@malon.dev> writes:
The verb "check" does not imply side-effect-free. By checking, each of these functions tries to achieve something, and the way the result of their work is conveyed back to the caller may not necessarily be only by their return values.
The adverb "gently" in this codebase typically means "the variant without gently signals problems by dying. Instead of dying, return to the caller with error code, so that the caller can decide to die".