environment: move ignore_case into repo_config_values
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 5 repliesIn review
- v22 patches 2 repliesSuperseded
- v12 patches 2 repliesSuperseded
Changes in v3 from the cover letter
- Revise the cover letter to clarify what the links lead to.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | environment: move ignore_case into repo_config_valuesenvironment.c environment.h | +16 | 0 replies | |
| 2/2 | config: use repo_ignore_case() to access core.ignorecaseapply.c builtin/ builtin/ +11 more | +27 | 0 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by.
| Patch | Christian Couder | Ayush Chandekar | Olamide Caleb Bello |
|---|---|---|---|
| Series | Mentored-by | Mentored-by | Mentored-by |
| 1/2 | Mentored-by | Mentored-by | Mentored-by |
| 2/2 | Mentored-by | Mentored-by | Mentored-by |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v3 0/2] environment: move ignore_case into repo_config_values
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!
[1] https://lore.kernel.org/git/[email protected]/
[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(-)
Signature · 1 line
2.43.0