Re: [Question] check_repository_format_gently() is not side-effect-free
- From
Tian Yuchen <cat@malon.dev>
- Date
- Mar 20, 2026, 16:26 UTC
- Message-ID
- <4d2001cc-ab9e-4595-88a4-fc650518ab3c@malon.dev>
- In-Reply-To
- <abzkC9uLwZz_nmgv@pks.im>
Hi Patrick,
On 3/20/26 14:07, Patrick Steinhardt wrote:
Show 9 quoted lines
> 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