[PATCH] wt-status: Show ignored files in untracked dirs
- From
Antoine Pelisse <apelisse@gmail.com>
- Date
- Dec 26, 2012, 10:16 UTC
- Message-ID
- <1356516985-31068-1-git-send-email-apelisse@gmail.com>
- In-Reply-To
- <50DA91AF.1060200@alum.mit.edu>
When looking for ignored files, we do not recurse into untracked directory, and simply consider the directory ignored status. As a consequence, we don't see ignored files in those directories.
Change that behavior by recursing into untracked directories searching for ignored files.
Signed-off-by: Antoine Pelisse <apelisse@gmail.com> --- I jumped in.
This seems to be broken since the creation of the --ignored option to wt-status.
This fixes the issue and breaks none of the existing tests. The behavior seems sane to me, giving something like that:
?? .gitignore ?? x ?? y/foo !! x.ignore-me !! y/foo.ignore-me
Cheers, Antoine
wt-status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wt-status.c b/wt-status.c index 2a9658b..7c41488 100644 --- a/wt-status.c +++ b/wt-status.c @@ -516,7 +516,7 @@ static void wt_status_collect_untracked(struct wt_status *s) if (s->show_ignored_files) { dir.nr = 0; - dir.flags = DIR_SHOW_IGNORED | DIR_SHOW_OTHER_DIRECTORIES; + dir.flags = DIR_SHOW_IGNORED; fill_directory(&dir, s->pathspec); for (i = 0; i < dir.nr; i++) { struct dir_entry *ent = dir.entries[i]; -- 1.8.1.rc3.11.g86c3e6e.dirty