Re: [GSOC PATCH v6 0/3] environment: remove sparse-checkout related global variables
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 30, 2025, 15:52 UTC
- Message-ID
- <xmqq1ppxn0al.fsf@gitster.g>
- In-Reply-To
- <d61c966b-61ae-4ba9-b983-c8dab6e2c292@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 9 quoted lines
> ... I wonder if instead we could change git_default_config() to expect > a repository pointer as the callback data and use that to initialize > things. That would mean that we would not need to move code out of > git_default_config() to remove global variables and we would retain > the "last one wins" behavior when two or more config keys such are > "merge.log" and "merge.summary" set the same variable. It would be > fairly invasive though as we'd need to pass the repository pointer > down through all the other callbacks that end up calling > git_default_config().
Sounds very painful, but it does sound like something worthwhile to do.
Thanks.