From: Christian Couder Date: Sat, 30 May 2026 18:14:01 GMT Subject: Re: [PATCH v1 4/4] read-cache: pass 'istate' to stat/mode helper functions Message-ID: In-Reply-To: <20260530160520.77859-5-cat@malon.dev> On Sat, May 30, 2026 at 6:05 PM Tian Yuchen 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?