summaryrefslogtreecommitdiff
path: root/builtin-ls-files.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-11-10 12:33:28 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-11-10 12:33:28 -0800
commit92396402e2d547f8805dc24db53a4c725796810e (patch)
tree2a9b3ba432b6e21d588f05f29cbfeb997030a7a3 /builtin-ls-files.c
parentMerge branch 'bg/merge-ff-only' (diff)
parentls-files: unbreak "ls-files -i" (diff)
downloadtgif-92396402e2d547f8805dc24db53a4c725796810e.tar.xz
Merge branch 'jk/maint-1.6.3-ls-files-i'
* jk/maint-1.6.3-ls-files-i: ls-files: unbreak "ls-files -i"
Diffstat (limited to 'builtin-ls-files.c')
-rw-r--r--builtin-ls-files.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/builtin-ls-files.c b/builtin-ls-files.c
index c5c0407b0b..c9a03e5427 100644
--- a/builtin-ls-files.c
+++ b/builtin-ls-files.c
@@ -170,6 +170,10 @@ static void show_files(struct dir_struct *dir, const char *prefix)
if (show_cached | show_stage) {
for (i = 0; i < active_nr; i++) {
struct cache_entry *ce = active_cache[i];
+ int dtype = ce_to_dtype(ce);
+ if (dir->flags & DIR_SHOW_IGNORED &&
+ !excluded(dir, ce->name, &dtype))
+ continue;
if (show_unmerged && !ce_stage(ce))
continue;
if (ce->ce_flags & CE_UPDATE)
@@ -182,6 +186,10 @@ static void show_files(struct dir_struct *dir, const char *prefix)
struct cache_entry *ce = active_cache[i];
struct stat st;
int err;
+ int dtype = ce_to_dtype(ce);
+ if (dir->flags & DIR_SHOW_IGNORED &&
+ !excluded(dir, ce->name, &dtype))
+ continue;
if (ce->ce_flags & CE_UPDATE)
continue;
err = lstat(ce->name, &st);