dir.c: git-ls-files --directories: don't hide empty directories
[gitweb.git] / wt-status.c
index ec5f27c5992e5fec5fb54384a04ffacf1745ce4a..676b058e59541b5fab0322f29cc6ef65babc1d60 100644 (file)
@@ -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];