diff options
author | Shawn Pearce <spearce@spearce.org> | 2006-02-24 17:02:34 -0500 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-02-24 16:16:34 -0800 |
commit | 1e3584053d56157549c01114f9550d1db7014a3e (patch) | |
tree | dbdf5d77a2c7962f2bf656c0ff5f883a426ba62e /ls-files.c | |
parent | 43f72af1bc754f164071140a073d35dad21d2e4e (diff) | |
download | git-1e3584053d56157549c01114f9550d1db7014a3e.tar.gz |
git ls files recursively show ignored files
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>
Diffstat (limited to 'ls-files.c')
-rw-r--r-- | ls-files.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ls-files.c b/ls-files.c index 90b289f03d..df25c8c012 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; |