X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=ls-files.c;h=df25c8c012a96a8277413ca3a81490b81b7dc067;hb=baa7b67d091acf4c666e79e386712bd5ea79326c;hp=90b289f03d987c6c90214fc12d00c30b4e28bb27;hpb=816c02ce8ecddce065e83db9f4ecb78f6b0e23dc;p=git.git diff --git a/ls-files.c b/ls-files.c index 90b289f0..df25c8c0 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;