From: Tian Yuchen Date: Sat, 30 May 2026 16:05:16 GMT Subject: [PATCH v1 1/4] read-cache: remove redundant extern declarations Message-ID: <20260530160520.77859-2-cat@malon.dev> In-Reply-To: <20260530160520.77859-1-cat@malon.dev> 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 --- read-cache.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/read-cache.c b/read-cache.c index 38a04b8de3..c44e4d128f 100644 --- a/read-cache.c +++ b/read-cache.c @@ -204,8 +204,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); -- 2.43.0