@@ -126,7 +126,7 @@ int count_slashes(const char *s)
126126
127127int git_fspathcmp (const char * a , const char * b )
128128{
129- return ignore_case ? strcasecmp (a , b ) : strcmp (a , b );
129+ return repo_ignore_case ( the_repository ) ? strcasecmp (a , b ) : strcmp (a , b );
130130}
131131
132132int fspatheq (const char * a , const char * b )
@@ -136,7 +136,7 @@ int fspatheq(const char *a, const char *b)
136136
137137int git_fspathncmp (const char * a , const char * b , size_t count )
138138{
139- return ignore_case ? strncasecmp (a , b , count ) : strncmp (a , b , count );
139+ return repo_ignore_case ( the_repository ) ? strncasecmp (a , b , count ) : strncmp (a , b , count );
140140}
141141
142142int paths_collide (const char * a , const char * b )
@@ -153,7 +153,7 @@ int paths_collide(const char *a, const char *b)
153153
154154unsigned int fspathhash (const char * str )
155155{
156- return ignore_case ? strihash (str ) : strhash (str );
156+ return repo_ignore_case ( the_repository ) ? strihash (str ) : strhash (str );
157157}
158158
159159int git_fnmatch (const struct pathspec_item * item ,
@@ -202,7 +202,7 @@ static int fnmatch_icase_mem(const char *pattern, int patternlen,
202202 use_str = str_buf .buf ;
203203 }
204204
205- if (ignore_case )
205+ if (repo_ignore_case ( the_repository ) )
206206 flags |= WM_CASEFOLD ;
207207 match_status = wildmatch (use_pat , use_str , flags );
208208
@@ -1851,7 +1851,7 @@ static struct dir_entry *dir_add_name(struct dir_struct *dir,
18511851 struct index_state * istate ,
18521852 const char * pathname , int len )
18531853{
1854- if (index_file_exists (istate , pathname , len , ignore_case ))
1854+ if (index_file_exists (istate , pathname , len , repo_ignore_case ( the_repository ) ))
18551855 return NULL ;
18561856
18571857 ALLOC_GROW (dir -> entries , dir -> nr + 1 , dir -> internal .alloc );
@@ -1888,7 +1888,7 @@ static enum exist_status directory_exists_in_index_icase(struct index_state *ist
18881888 if (index_dir_exists (istate , dirname , len ))
18891889 return index_directory ;
18901890
1891- ce = index_file_exists (istate , dirname , len , ignore_case );
1891+ ce = index_file_exists (istate , dirname , len , repo_ignore_case ( the_repository ) );
18921892 if (ce && S_ISGITLINK (ce -> ce_mode ))
18931893 return index_gitdir ;
18941894
@@ -1907,7 +1907,7 @@ static enum exist_status directory_exists_in_index(struct index_state *istate,
19071907{
19081908 int pos ;
19091909
1910- if (ignore_case )
1910+ if (repo_ignore_case ( the_repository ) )
19111911 return directory_exists_in_index_icase (istate , dirname , len );
19121912
19131913 pos = index_name_pos (istate , dirname , len );
@@ -2447,7 +2447,7 @@ static enum path_treatment treat_path(struct dir_struct *dir,
24472447
24482448 /* Always exclude indexed files */
24492449 has_path_in_index = !!index_file_exists (istate , path -> buf , path -> len ,
2450- ignore_case );
2450+ repo_ignore_case ( the_repository ) );
24512451 if (dtype != DT_DIR && has_path_in_index )
24522452 return path_none ;
24532453
@@ -3201,7 +3201,7 @@ static int cmp_icase(char a, char b)
32013201{
32023202 if (a == b )
32033203 return 0 ;
3204- if (ignore_case )
3204+ if (repo_ignore_case ( the_repository ) )
32053205 return toupper (a ) - toupper (b );
32063206 return a - b ;
32073207}
0 commit comments