Thread (29 messages) 29 messages, 4 authors, 9h ago

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

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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help