dir.c: unify is_excluded and is_path_excluded APIs
[gitweb.git] / wt-status.c
index 09416db348cb0e5e1bfc1fe82878c9afe627e09f..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];
@@ -1225,14 +1225,10 @@ void wt_status_print(struct wt_status *s)
                if (advice_status_u_option && 2000 < s->untracked_in_ms) {
                        status_printf_ln(s, GIT_COLOR_NORMAL, "");
                        status_printf_ln(s, GIT_COLOR_NORMAL,
-                                _("It took %.2f seconds to enumerate untracked files."
-                                  "  'status -uno'"),
-                                s->untracked_in_ms / 1000.0);
-                       status_printf_ln(s, GIT_COLOR_NORMAL,
-                                _("may speed it up, but you have to be careful not"
-                                  " to forget to add"));
-                       status_printf_ln(s, GIT_COLOR_NORMAL,
-                                _("new files yourself (see 'git help status')."));
+                                        _("It took %.2f seconds to enumerate untracked files. 'status -uno'\n"
+                                          "may speed it up, but you have to be careful not to forget to add\n"
+                                          "new files yourself (see 'git help status')."),
+                                        s->untracked_in_ms / 1000.0);
                }
        } else if (s->commitable)
                status_printf_ln(s, GIT_COLOR_NORMAL, _("Untracked files not listed%s"),