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

[PATCH 0/2] environment: move ignore_case into repo_config_values

From
Tian Yuchen <cat@malon.dev>
Date
Jun 17, 2026, 15:49 UTC
Message-ID
<20260617154929.564498-1-cat@malon.dev>

The 'core.ignorecase' configuration, stored as the global variable 'ignore_case', acts as a core filesystem capability flag.

This series continues the ongoing libification effort by moving this global variable into struct 'repo_config_values', tying it to the specific repository instance it was read from. This allows us to encapsulate the configuration without altering its eager-parsing behavior.

The getter function 'repo_get_ignore_case()' is introduced so that we can safely retrieve the configuration value whilst maintaining the correct fallback logic.

RFC Questions:

environment.h --- Is the fallback logic for repo_get_ignore_case() correct? I am unsure whether gitdir should be used here, since it might not be ready when we access it in the early stage of initialization (e.g. git init / git clone).

dir.c --- Performance overhead?

compat/win32/path-utils.c --- Is it appropriate to include the repository.h header file?

Related materials:

[1] In this patch to migrate protect_hfs and protect_ntfs, the approach of introducing getters has been endorsed. [2] Derrick Stolee's previous attempt. The reasons for the failure are also mentioned in [1].

Thanks!
Mentored-by: Christian Couder christian.couder@gmail.com
Mentored-by: Ayush Chandekar ayu.chandekar@gmail.com
Mentored-by: Olamide Caleb Bello belkid98@gmail.com
Signed-off-by: Tian Yuchen cat@malon.dev

[1] https://lore.kernel.org/git/20260606143412.15443-1-cat@malon.dev/ [2] https://lore.kernel.org/git/2b4198c09cb6c04c60608d19072d419503dfe5df.1685716421.git.gitgitgadget@gmail.com/

Tian Yuchen (2):
  environment: move ignore_case into repo_config_values
  config: use repo_get_ignore_case() to access core.ignorecase
 apply.c                             |  2 +-
 builtin/fetch.c                     |  2 +-
 builtin/mv.c                        |  2 +-
 compat/win32/path-utils.c           |  3 ++-
 dir.c                               | 18 +++++++++---------
 environment.c                       | 11 +++++++++--
 environment.h                       |  9 ++++++++-
 fsmonitor.c                         |  2 +-
 name-hash.c                         |  6 +++---
 read-cache.c                        |  6 +++---
 refs/files-backend.c                |  4 ++--
 submodule.c                         |  2 +-
 t/helper/test-lazy-init-name-hash.c |  2 +-
 unpack-trees.c                      |  2 +-
 14 files changed, 43 insertions(+), 28 deletions(-)
-- 
2.43.0
Next: Tian Yuchen
Message 1 of 18 in “environment: move ignore_case into repo_config_values”
  1. 0/2 environment: move ignore_case into repo_config_valuesTian Yuchen, Jun 17, 2026
  2. 1/2 environment: move ignore_case into repo_config_valuesTian Yuchen, Jun 17, 2026
  3. Junio C HamanoJun 17, 2026
  4. Tian YuchenJun 18, 2026
  5. 2/2 config: use repo_get_ignore_case() to access core.ignorecaseTian Yuchen, Jun 17, 2026
  6. 0/2 environment: move ignore_case into repo_config_valuesTian Yuchen, Jun 18, 2026
  7. 1/2 environment: move ignore_case into repo_config_valuesTian Yuchen, Jun 18, 2026
  8. 2/2 config: use repo_ignore_case() to access core.ignorecaseTian Yuchen, Jun 18, 2026
  9. Junio C HamanoJun 18, 2026
  10. Tian YuchenJun 19, 2026
  11. 0/2 environment: move ignore_case into repo_config_valuesTian Yuchen, Jun 19, 2026
  12. 1/2 environment: move ignore_case into repo_config_valuesTian Yuchen, Jun 19, 2026
  13. 2/2 config: use repo_ignore_case() to access core.ignorecaseTian Yuchen, Jun 19, 2026
  14. Junio C HamanoJun 21, 2026
  15. Tian YuchenJun 22, 2026
  16. Junio C HamanoJun 22, 2026
  17. Johannes SchindelinJul 10, 2026
  18. Junio C HamanoJul 10, 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.