public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Tian Yuchen <cat@malon.dev>
Cc: Git <git@vger.kernel.org>
Subject: Re: [Question] check_repository_format_gently() is not side-effect-free
Date: Thu, 19 Mar 2026 11:07:09 -0700	[thread overview]
Message-ID: <xmqqfr5vlmlu.fsf@gitster.g> (raw)
In-Reply-To: <c0bb931a-3ee6-416b-8ceb-9fab013a621e@malon.dev> (Tian Yuchen's message of "Fri, 20 Mar 2026 01:45:25 +0800")

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".

  reply	other threads:[~2026-03-19 18:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 17:45 [Question] check_repository_format_gently() is not side-effect-free Tian Yuchen
2026-03-19 18:07 ` Junio C Hamano [this message]
2026-03-20  0:24   ` Tian Yuchen
2026-03-20  6:07     ` Patrick Steinhardt
2026-03-20 15:56       ` Junio C Hamano
2026-03-20 16:26       ` Tian Yuchen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqfr5vlmlu.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=cat@malon.dev \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox