X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=ls-files.c;h=df25c8c012a96a8277413ca3a81490b81b7dc067;hb=70ca1a3f854be0d3b429e66f1484f9ca73a79828;hp=90b289f03d987c6c90214fc12d00c30b4e28bb27;hpb=882e4dc18347de18f0ab89ea055dda281c295092;p=git.git diff --git a/ls-files.c b/ls-files.c index 90b289f03..df25c8c01 100644 --- a/ls-files.c +++ b/ls-files.c @@ -279,8 +279,11 @@ static void read_directory(const char *path, const char *base, int baselen) continue; len = strlen(de->d_name); memcpy(fullname + baselen, de->d_name, len+1); - if (excluded(fullname) != show_ignored) - continue; + if (excluded(fullname) != show_ignored) { + if (!show_ignored || DTYPE(de) != DT_DIR) { + continue; + } + } switch (DTYPE(de)) { struct stat st;