public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Tian Yuchen <cat@malon•dev>
To: Patrick Steinhardt <ps@pks•im>
Cc: Junio C Hamano <gitster@pobox•com>, Git <git@vger•kernel.org>
Subject: Re: [Question] check_repository_format_gently() is not side-effect-free
Date: Sat, 21 Mar 2026 00:26:21 +0800	[thread overview]
Message-ID: <4d2001cc-ab9e-4595-88a4-fc650518ab3c@malon.dev> (raw)
In-Reply-To: <abzkC9uLwZz_nmgv@pks.im>

Hi Patrick,

On 3/20/26 14:07, Patrick Steinhardt wrote:

> Yes, I think that the whole of "setup.c" is something we will want to
> refactor eventually so that it does not modify global state anymore. So
> it's not only `check_repository_format_gently()`, but also lots of other
> functionality in that file. The motivation is not only being able to set
> up multiple repositories, but also making the code overall easier to
> understand.
> 
> That being said, I'll give a small warning that it's probably
> non-trivial to refactor this subystem 🙂

Thanks for the reply!

It’s true — setup.c seems utterly baffling to me. I thought I understood 
it before, but the more closely I look at it, the more I realize there 
are details everywhere that require careful attention.

I won't drop a break-the-world patch out of nowhere. I'll keep learning 
until I'm able to do so ;)

Thanks,

Yuchen

      parent reply	other threads:[~2026-03-20 16:26 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
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 [this message]

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=4d2001cc-ab9e-4595-88a4-fc650518ab3c@malon.dev \
    --to=cat@malon$(echo .)dev \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=ps@pks$(echo .)im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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