From: Tian Yuchen <cat@malon.dev>
To: git@vger.kernel.org
Cc: ps@pks.im, phillip.wood123@gmail.com, johannes.schindelin@gmx.de,
stolee@gmail.com, Tian Yuchen <cat@malon.dev>
Subject: [PATCH v3 0/2] environment: move ignore_case into repo_config_values
Date: Fri, 19 Jun 2026 23:51:50 +0800 [thread overview]
Message-ID: <20260619155152.642760-1-cat@malon.dev> (raw)
In-Reply-To: <20260618114207.605211-1-cat@malon.dev>
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_ignore_case()' is introduced so
that we can safely retrieve the configuration value whilst
maintaining the correct fallback logic.
RFC Questions:
dir.c --- Performance overhead?
compat/win32/path-utils.c --- Is it appropriate to include the
repository.h header file?
Related materials:
[1] The practice of introducing getters for filesystem flags
to ensure safe access was previously introduced in this patch
to migrate 'protect_hfs' and 'protect_ntfs'.
When migrating 'ignore_case', the same approach is strictly followed.
[2] Derrick Stolee's previous attempt. This patch series attempted
to wrap this kind of filesystem-level variable using a lazy-loaded
global accessor get_int_config_global().
However, as Glen Choo pointed out in his review of that
series, it is strongly preferred to use plain fields in a
repository-scoped struct over global lazy-loaders, provided
those fields are properly initialized during the setup process.
Changes since V2:
- Revise the cover letter to clarify what the links lead to.
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_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 prev parent reply other threads:[~2026-06-19 15:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 15:49 [PATCH 0/2] environment: move ignore_case into repo_config_values Tian Yuchen
2026-06-17 15:49 ` [PATCH 1/2] " Tian Yuchen
2026-06-17 17:16 ` Junio C Hamano
2026-06-18 10:56 ` Tian Yuchen
2026-06-17 15:49 ` [PATCH 2/2] config: use repo_get_ignore_case() to access core.ignorecase Tian Yuchen
2026-06-18 11:42 ` [PATCH v2 0/2] environment: move ignore_case into repo_config_values Tian Yuchen
2026-06-18 11:42 ` [PATCH v2 1/2] " Tian Yuchen
2026-06-18 11:42 ` [PATCH v2 2/2] config: use repo_ignore_case() to access core.ignorecase Tian Yuchen
2026-06-18 13:14 ` [PATCH v2 0/2] environment: move ignore_case into repo_config_values Junio C Hamano
2026-06-19 16:01 ` Tian Yuchen
2026-06-19 15:51 ` Tian Yuchen [this message]
2026-06-19 15:51 ` [PATCH v3 1/2] " Tian Yuchen
2026-06-19 15:51 ` [PATCH v3 2/2] config: use repo_ignore_case() to access core.ignorecase Tian Yuchen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260619155152.642760-1-cat@malon.dev \
--to=cat@malon.dev \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
--cc=phillip.wood123@gmail.com \
--cc=ps@pks.im \
--cc=stolee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.