Re: [PATCH] environment: move diff_auto_refresh_index into repo_config_values
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 3, 2026, 06:21 UTC
- Message-ID
- <xmqqtslybfl1.fsf@gitster.g>
- In-Reply-To
- <pull.2289.git.1793607304156.gitgitgadget@gmail.com>
"Ebele Lynda Okolo via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 6 quoted lines
> From: Lynndabel <okolo.ebelelynda@gmail.com> > > The diff_auto_refresh_index variable is currently a global, > which makes it difficult to use Git as a library since > global state can't be isolated between different repository > instances.
We do not want to put it in repo_config_value, because access to the structure will barf when given anything other than the_repository, hence such a move does not help the "library" scene very much to begin with.
It is only set in diff.c when the ui related configuration variable is read from the git_config() callback. The callback is *not* repository specific but is a synthesized computation result after reading system, global, and repository configuration files, which is another reason why it does not look like a good idea to tie this setting to repo_config_values.
Thanks.