diff options
author | Brandon Williams <bmwill@google.com> | 2017-06-13 00:14:03 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-13 20:40:51 +0200 |
commit | 1d35e3bf056b508f4ece3875f9d2851be5fcd3d4 (patch) | |
tree | 289e8470e54dfab6c6db578460ab14ea42963884 /builtin/ls-files.c | |
parent | ls-files: convert show_ru_info to take an index (diff) | |
download | git-1d35e3bf056b508f4ece3875f9d2851be5fcd3d4.tar.xz git-1d35e3bf056b508f4ece3875f9d2851be5fcd3d4.zip |
ls-files: convert ce_excluded to take an index
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/ls-files.c')
-rw-r--r-- | builtin/ls-files.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 375fe09d1e..762257f399 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -321,10 +321,11 @@ static void show_ru_info(const struct index_state *istate) } } -static int ce_excluded(struct dir_struct *dir, const struct cache_entry *ce) +static int ce_excluded(struct dir_struct *dir, struct index_state *istate, + const struct cache_entry *ce) { int dtype = ce_to_dtype(ce); - return is_excluded(dir, &the_index, ce->name, &dtype); + return is_excluded(dir, istate, ce->name, &dtype); } static void show_files(struct dir_struct *dir) @@ -345,7 +346,7 @@ static void show_files(struct dir_struct *dir) for (i = 0; i < active_nr; i++) { const struct cache_entry *ce = active_cache[i]; if ((dir->flags & DIR_SHOW_IGNORED) && - !ce_excluded(dir, ce)) + !ce_excluded(dir, &the_index, ce)) continue; if (show_unmerged && !ce_stage(ce)) continue; @@ -361,7 +362,7 @@ static void show_files(struct dir_struct *dir) struct stat st; int err; if ((dir->flags & DIR_SHOW_IGNORED) && - !ce_excluded(dir, ce)) + !ce_excluded(dir, &the_index, ce)) continue; if (ce->ce_flags & CE_UPDATE) continue; |