dir.c: replace is_path_excluded with now equivalent is_excluded API

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Karsten Blees
2013-04-15 21:12:57 +02:00
committed by Junio C Hamano
parent 95c6f27164
commit b07bc8c8c3
7 changed files with 16 additions and 116 deletions

View File

@ -201,19 +201,15 @@ static void show_ru_info(void)
}
}
static int ce_excluded(struct path_exclude_check *check, struct cache_entry *ce)
static int ce_excluded(struct dir_struct *dir, struct cache_entry *ce)
{
int dtype = ce_to_dtype(ce);
return is_path_excluded(check, ce->name, ce_namelen(ce), &dtype);
return is_excluded(dir, ce->name, &dtype);
}
static void show_files(struct dir_struct *dir)
{
int i;
struct path_exclude_check check;
if ((dir->flags & DIR_SHOW_IGNORED))
path_exclude_check_init(&check, dir);
/* For cached/deleted files we don't need to even do the readdir */
if (show_others || show_killed) {
@ -227,7 +223,7 @@ static void show_files(struct dir_struct *dir)
for (i = 0; i < active_nr; i++) {
struct cache_entry *ce = active_cache[i];
if ((dir->flags & DIR_SHOW_IGNORED) &&
!ce_excluded(&check, ce))
!ce_excluded(dir, ce))
continue;
if (show_unmerged && !ce_stage(ce))
continue;
@ -243,7 +239,7 @@ static void show_files(struct dir_struct *dir)
struct stat st;
int err;
if ((dir->flags & DIR_SHOW_IGNORED) &&
!ce_excluded(&check, ce))
!ce_excluded(dir, ce))
continue;
if (ce->ce_flags & CE_UPDATE)
continue;
@ -256,9 +252,6 @@ static void show_files(struct dir_struct *dir)
show_ce_entry(tag_modified, ce);
}
}
if ((dir->flags & DIR_SHOW_IGNORED))
path_exclude_check_clear(&check);
}
/*