Re: [PATCH v1 4/4] read-cache: pass 'istate' to stat/mode helper functions
From: Christian Couder <hidden>
Date: 2026-05-30 18:14:13
From: Christian Couder <hidden>
Date: 2026-05-30 18:14:13
On Sat, May 30, 2026 at 6:05 PM Tian Yuchen [off-list ref] wrote:
In the previous commit, the gloabl 'trust_executable_bit' was
s/gloabl/global/
migrated into 'repo_config_values', but low-level helpers in read-cache.c still relied on 'the_repository' to access it. Refactor the signatures of ce_mode_from_stat(), st_mode_from_ce(), fake_lstat(), and check_removed() to accept a 'struct index_state *istate'. This allows these functions to retrieve the repository context via 'istate->repo'.
The cover letter contains: "In other words, this series of patches is laying the groundwork for the eventual elimination of 'the_repository'." but I think it would be also interesting to have something similar here, as this is especially relevant to this commit. For example maybe add something like "which will help with removing 'the_repository' in the future" to the last sentence?