[PATCH v3 0/3] environment: migrate 'trust_executable_bit' into 'repo_config_values'
From: Tian Yuchen <hidden>
Date: 2026-06-12 16:05:47
The 'core.filemode' (stored as 'trust_executable_bit') configuration act as a core filesystem capability flag. This series moves it into 'struct repo_config_values' to tie it to the specific repository instance it was read from. Eager parsing is maintained because this flag is heavily consulted in hot paths. Note: 'repo_config_values()' still does not support any struct repository other than the_repository due to how deeply these flags are accessed. In other words, this series of patches is laying the groundwork for the eventual elimination of the_repository. Previous related work: [PATCH 2/6] config: add trust_executable_bit to global config [1] [PATCH] Refactor 'trust_executable_bit' to repository-scoped setting [2] (This previous attempt was unsuccessful because the target location selected was 'struct repo_settings', which our analysis indicated was not the optimal choice. For further details, please see: [3]) Changes since V2: Fixed a whole bunch of typos; Moved the comment for 'ce_mode_from_stat()' from 'read-cache.c' to 'read-cache.h'. Thanks! [1] https://lore.kernel.org/git/837b5360b40f992351f489a0ae05fedf49884c6e.1685716420.git.gitgitgadget@gmail.com/ (local) [2] https://lore.kernel.org/git/20260301190017.53539-1-dronarajgyawali@gmail.com/ (local) [3] https://lore.kernel.org/git/xmqq1pht6nyx.fsf@gitster.g/ (local) Mentored-by: Christian Couder [off-list ref] Mentored-by: Ayush Chandekar [off-list ref] Mentored-by: Olamide Caleb Bello [off-list ref] Signed-off-by: Tian Yuchen <redacted> Tian Yuchen (3): read-cache: remove redundant extern declarations read-cache: move 'ce_mode_from_stat()' to 'read-cache.c' environment: move trust_executable_bit into repo_config_values apply.c | 2 +- environment.c | 11 +++++++++-- environment.h | 9 ++++++++- read-cache.c | 21 ++++++++++++++++----- read-cache.h | 23 +++++++++-------------- 5 files changed, 43 insertions(+), 23 deletions(-) -- 2.43.0