summaryrefslogtreecommitdiff
path: root/contrib/persistent-https
diff options
context:
space:
mode:
authorTian Yuchen <cat@malon.dev>2026-07-20 18:53:33 +0800
committerJunio C Hamano <gitster@pobox.com>2026-07-20 07:37:05 -0700
commitb7b6e9e02f6b6b84848b2458d5d2b3d47260d4bb (patch)
treee664b132d37b3a7539c3d5082591bddfc9211729 /contrib/persistent-https
parent8817d7931aab41d4423fbf588f1ab2247070d816 (diff)
read-cache: pass 'repo' to 'ce_mode_from_stat()'
The ce_mode_from_stat() function is a performance-critical static inline helper in 'read-cache.h'. As we migrate configuration variables into the repository struct, this helper needs access to the repository context. Update the signature of ce_mode_from_stat() to take a 'struct repository *' parameter, and update all callers to pass the appropriate repository instance. To prepare for the overhead of replacing cheap global variable accesses with getter functions, the boolean expressions are reordered to evaluate 'S_ISREG(mode)' first. While at it, add a comment for ce_mode_from_stat(). Mentored-by: Christian Couder <christian.couder@gmail.com> Mentored-by: Ayush Chandekar <ayu.chandekar@gmail.com> Mentored-by: Olamide Caleb Bello <belkid98@gmail.com> Signed-off-by: Tian Yuchen <cat@malon.dev> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions