X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-ls-files.c;h=c9a03e5427bbf1390aeefb9d48b4e362ca6a8e1b;hb=6f53c3b21e3899716caccc2f88a1186ca7fa0f60;hp=2c95ca61056f0c0b6ac0240605e2e4de895a6804;hpb=302e99b79a47e55274c9ba91bb7ac9d5d6292925;p=git.git diff --git a/builtin-ls-files.c b/builtin-ls-files.c index 2c95ca610..c9a03e542 100644 --- a/builtin-ls-files.c +++ b/builtin-ls-files.c @@ -171,8 +171,8 @@ static void show_files(struct dir_struct *dir, const char *prefix) for (i = 0; i < active_nr; i++) { struct cache_entry *ce = active_cache[i]; int dtype = ce_to_dtype(ce); - if (excluded(dir, ce->name, &dtype) != - !!(dir->flags & DIR_SHOW_IGNORED)) + if (dir->flags & DIR_SHOW_IGNORED && + !excluded(dir, ce->name, &dtype)) continue; if (show_unmerged && !ce_stage(ce)) continue; @@ -187,8 +187,8 @@ static void show_files(struct dir_struct *dir, const char *prefix) struct stat st; int err; int dtype = ce_to_dtype(ce); - if (excluded(dir, ce->name, &dtype) != - !!(dir->flags & DIR_SHOW_IGNORED)) + if (dir->flags & DIR_SHOW_IGNORED && + !excluded(dir, ce->name, &dtype)) continue; if (ce->ce_flags & CE_UPDATE) continue;