mirror of
https://github.com/git/git.git
synced 2026-08-09 01:21:47 +00:00
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 <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>
This commit is contained in:
committed by
Junio C Hamano
parent
c69baaf57b
commit
8817d7931a
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user