From: Tian Yuchen Date: Sat, 13 Jun 2026 15:33:00 GMT Subject: [PATCH v3 0/1] environment: move protect_hfs and protect_ntfs into repo_config_values Message-ID: <20260613153302.168801-1-cat@malon.dev> In-Reply-To: <20260610124353.149874-1-cat@malon.dev> Hi everyone, This series continues the ongoing libification effort by moving the global filesystem variables, 'protect_hfs' and 'protect_ntfs', into 'struct repo_config_values'. Place them within the per-repository configuration structure aligns with our goal of removing global states. For reviewers familiar with previous libification efforts, Derrick Stolee attempted to wrap this kind of filesystem-level variable using a lazy-loaded global accessor get_int_config_global() [1]. However, as Glen Choo pointed out in his review of that series [2], 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. By moving these variables into repo_config_values and parsing them eagerly, we successfully tie the filesystem security flags to the specific repository instance without altering the timing of configuration warnings or introducing new global states. Thanks! Recent related patch (environment.c: migrate 'trust_executable_bit' into 'repo_config_values'): [3] Changes since V2: 1. s/environment.c/environment 2. Updated the link for "Recent related patch" [1] https://lore.kernel.org/git/a42dd9397d07b2dc4a0d7e75bfe1af2e46cad262.1685716420.git.gitgitgadget@gmail.com/ [2] https://lore.kernel.org/git/kl6lbkhpzujf.fsf@chooglen-macbookpro.roam.corp.google.com/ [3] https://lore.kernel.org/git/20260612160527.167203-1-cat@malon.dev/ Mentored-by: Christian Couder Mentored-by: Ayush Chandekar Mentored-by: Olamide Caleb Bello Signed-off-by: Tian Yuchen Tian Yuchen (1): environment: move 'protect_hfs' and 'protect_ntfs' into 'repo_config_values' compat/mingw.c | 2 +- environment.c | 22 ++++++++++++++++++---- environment.h | 12 ++++++++++-- read-cache.c | 7 ++++--- t/helper/test-path-utils.c | 24 +++++++++++++++--------- 5 files changed, 48 insertions(+), 19 deletions(-) -- 2.43.0