From: Tian Yuchen Date: Fri, 27 Feb 2026 15:07:54 GMT Subject: Re: [GSoC][Draft Proposal v4] Refactoring in order to reduce Git's global state Message-ID: <86cf5f3f-1459-4281-ae97-24f2d834e099@gmail.com> In-Reply-To: <1d43d1d0-bf6b-4806-834e-89f545fab766@gmail.com> Hi Phillip, Wow, your reply is very detailed. Appreciate. > There are four steps below... Yup, a typo. > Note that as settings in struct repo_settings are lazily parsed, it is > only suitable for settings that are already lazily parsed. That means it > is not a suitable home for any settings that are parsed at startup by > git_default_config(). This makes sense to me. So for variables in like 'git_default_config()', their startup parsing nature must be preserved. Will update the proposal to explicitly distinguish between these different lifecycles. > Where a function only needs one piece of information from struct > repository that sounds like a good strategy. It's much better to pass just that value down rather than passing the entire 'struct repository', right? > Although `editor_program` is parsed once, that happens in > git_default_config() so it is not lazily loaded and making it lazily > loaded would be a regression as if the config value is invalid we want > to exit with an error early in the process, not just before we prompt > the user to edit a file. Oh, I thought it was lazy-loaded. I completely overlooked the user experience in terms of a delayed fatal config error also. Will double check the source code and rewrite this part. I'm delighted to see more people reviewing my proposal. I've truly gained valuable insights into Git's design philosophy. My sincere gratitude to you. Regards, Yuchen