]> git.99rst.org Git - git.git/commitdiff
read-cache: remove redundant extern declarations
authorTian Yuchen <redacted>
Mon, 20 Jul 2026 10:53:32 +0000 (18:53 +0800)
committerJunio C Hamano <redacted>
Mon, 20 Jul 2026 14:37:05 +0000 (07:37 -0700)
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 <redacted>
Mentored-by: Ayush Chandekar <redacted>
Mentored-by: Olamide Caleb Bello <redacted>
Signed-off-by: Tian Yuchen <redacted>
Signed-off-by: Junio C Hamano <redacted>
read-cache.c

index 21829102ae275e124eb7b94550bc7ccf16993bac..1ced8c630ef637340f3063ae06bd2aa1f0d894bf 100644 (file)
@@ -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);
git clone https://git.99rst.org/PROJECT