git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Ebele Lynda Okolo via GitGitGadget
Message 2 of 2 in “environment: move diff_auto_refresh_index into repo_config_values”
  1. environment: move diff_auto_refresh_index into repo_config_valuesEbele Lynda Okolo via GitGitGadget, Nov 2, 2026
  2. Junio C HamanoNov 3, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.