From: Tian Yuchen Date: Fri, 20 Mar 2026 16:26:21 GMT Subject: Re: [Question] check_repository_format_gently() is not side-effect-free Message-ID: <4d2001cc-ab9e-4595-88a4-fc650518ab3c@malon.dev> In-Reply-To: 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