Re: [PATCH v1 4/4] read-cache: pass 'istate' to stat/mode helper functions
- From
Christian Couder <christian.couder@gmail.com>
- Date
- May 30, 2026, 18:14 UTC
- Message-ID
- <CAP8UFD20yij=1ZEYnR74DoCJ3g=b39yOsUxZecYuuf7nFGaKyA@mail.gmail.com>
- In-Reply-To
- <20260530160520.77859-5-cat@malon.dev>
On Sat, May 30, 2026 at 6:05 PM Tian Yuchen <cat@malon.dev> wrote:
> > In the previous commit, the gloabl 'trust_executable_bit' was
s/gloabl/global/
Show 7 quoted lines
> 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?