@@ -1204,19 +1204,20 @@ static void prep_exclude(struct dir_struct *dir,
12041204 * undecided.
12051205 */
12061206struct exclude * last_exclude_matching (struct dir_struct * dir ,
1207- const char * pathname ,
1208- int * dtype_p )
1207+ struct index_state * istate ,
1208+ const char * pathname ,
1209+ int * dtype_p )
12091210{
12101211 int pathlen = strlen (pathname );
12111212 const char * basename = strrchr (pathname , '/' );
12121213 basename = (basename ) ? basename + 1 : pathname ;
12131214
1214- prep_exclude (dir , & the_index , pathname , basename - pathname );
1215+ prep_exclude (dir , istate , pathname , basename - pathname );
12151216
12161217 if (dir -> exclude )
12171218 return dir -> exclude ;
12181219
1219- return last_exclude_matching_from_lists (dir , & the_index , pathname , pathlen ,
1220+ return last_exclude_matching_from_lists (dir , istate , pathname , pathlen ,
12201221 basename , dtype_p );
12211222}
12221223
@@ -1225,10 +1226,11 @@ struct exclude *last_exclude_matching(struct dir_struct *dir,
12251226 * scans all exclude lists to determine whether pathname is excluded.
12261227 * Returns 1 if true, otherwise 0.
12271228 */
1228- int is_excluded (struct dir_struct * dir , const char * pathname , int * dtype_p )
1229+ int is_excluded (struct dir_struct * dir , struct index_state * istate ,
1230+ const char * pathname , int * dtype_p )
12291231{
12301232 struct exclude * exclude =
1231- last_exclude_matching (dir , pathname , dtype_p );
1233+ last_exclude_matching (dir , istate , pathname , dtype_p );
12321234 if (exclude )
12331235 return exclude -> flags & EXC_FLAG_NEGATIVE ? 0 : 1 ;
12341236 return 0 ;
@@ -1573,7 +1575,7 @@ static enum path_treatment treat_one_path(struct dir_struct *dir,
15731575 (directory_exists_in_index (& the_index , path -> buf , path -> len ) == index_nonexistent ))
15741576 return path_none ;
15751577
1576- exclude = is_excluded (dir , path -> buf , & dtype );
1578+ exclude = is_excluded (dir , & the_index , path -> buf , & dtype );
15771579
15781580 /*
15791581 * Excluded? If we don't explicitly want to show
0 commit comments