summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 43f72af)
raw | patch | inline | side by side (parent: 43f72af)
author | Shawn Pearce <spearce@spearce.org> | |
Fri, 24 Feb 2006 22:02:34 +0000 (17:02 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 25 Feb 2006 00:16:34 +0000 (16:16 -0800) |
Make git-ls-files --others --ignored recurse into non-excluded
subdirectories.
Typically when asking git-ls-files to display all files which are
ignored by one or more exclude patterns one would want it to recurse
into subdirectories which are not themselves excluded to see if
there are any excluded files contained within those subdirectories.
Signed-off-by: Junio C Hamano <junkio@cox.net>
subdirectories.
Typically when asking git-ls-files to display all files which are
ignored by one or more exclude patterns one would want it to recurse
into subdirectories which are not themselves excluded to see if
there are any excluded files contained within those subdirectories.
Signed-off-by: Junio C Hamano <junkio@cox.net>
ls-files.c | patch | blob | history |
diff --git a/ls-files.c b/ls-files.c
index 90b289f03d987c6c90214fc12d00c30b4e28bb27..df25c8c012a96a8277413ca3a81490b81b7dc067 100644 (file)
--- a/ls-files.c
+++ b/ls-files.c
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;