diff options
author | Karsten Blees <karsten.blees@gmail.com> | 2013-04-15 21:08:02 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-15 12:33:59 -0700 |
commit | 184d2a8e964d721c20775026308fcf63d57c0b4d (patch) | |
tree | 4f88e5c52142ceef9c44c4326bcc77beecf431e3 /wt-status.c | |
parent | 0104c9e7816e30701e4fdd9143889faacfa0eefa (diff) | |
download | git-184d2a8e964d721c20775026308fcf63d57c0b4d.tar.gz |
dir.c: git-ls-files --directories: don't hide empty directories
'git-ls-files --ignored --directories' hides empty directories even though
--no-empty-directory was not specified.
Treat the DIR_HIDE_EMPTY_DIRECTORIES flag independently from
DIR_SHOW_IGNORED to make all git-ls-files options work as expected.
Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wt-status.c')
-rw-r--r-- | wt-status.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wt-status.c b/wt-status.c index ec5f27c599..676b058e59 100644 --- a/wt-status.c +++ b/wt-status.c @@ -526,7 +526,7 @@ static void wt_status_collect_untracked(struct wt_status *s) dir.nr = 0; dir.flags = DIR_SHOW_IGNORED; if (s->show_untracked_files != SHOW_ALL_UNTRACKED_FILES) - dir.flags |= DIR_SHOW_OTHER_DIRECTORIES; + dir.flags |= DIR_SHOW_OTHER_DIRECTORIES | DIR_HIDE_EMPTY_DIRECTORIES; fill_directory(&dir, s->pathspec); for (i = 0; i < dir.nr; i++) { struct dir_entry *ent = dir.entries[i]; |