From: Tian Yuchen Date: Mon, 20 Jul 2026 10:53:32 +0000 (+0800) Subject: read-cache: remove redundant extern declarations X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8817d7931aab41d4423fbf588f1ab2247070d816;p=thirdparty%2Fgit.git read-cache: remove redundant extern declarations The 'read-cache.c' file already includes 'environment.h', which provides the extern declarations for variables like 'trust_executable_bit' and 'has_symlinks'. Remove the redundant extern declarations inside 'st_mode_from_ce()' to clean up the code. Mentored-by: Christian Couder Mentored-by: Ayush Chandekar Mentored-by: Olamide Caleb Bello Signed-off-by: Tian Yuchen Signed-off-by: Junio C Hamano --- diff --git a/read-cache.c b/read-cache.c index 21829102ae..1ced8c630e 100644 --- a/read-cache.c +++ b/read-cache.c @@ -205,8 +205,6 @@ void fill_stat_cache_info(struct index_state *istate, struct cache_entry *ce, st static unsigned int st_mode_from_ce(const struct cache_entry *ce) { - extern int trust_executable_bit, has_symlinks; - switch (ce->ce_mode & S_IFMT) { case S_IFLNK: return has_symlinks ? S_IFLNK : (S_IFREG | 0644);