Merge branch 'mg/advice-statushints'
authorJunio C Hamano <gitster@pobox.com>
Fri, 21 May 2010 11:02:23 +0000 (04:02 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 May 2010 11:02:23 +0000 (04:02 -0700)
* mg/advice-statushints:
  wt-status: take advice.statusHints seriously
  t7508: test advice.statusHints

Conflicts:
wt-status.c

1  2 
t/t7508-status.sh
wt-status.c

Simple merge
diff --cc wt-status.c
index 84a9002b8e588a66a34e1b20a94b25bf133c8688,d44486c826ee46d258e88c5013d038243aad2756..14e0acce8cc92f332a5b88482621119ec4dc1ded
@@@ -646,12 -622,12 +646,14 @@@ void wt_status_print(struct wt_status *
                wt_status_print_submodule_summary(s, 0);  /* staged */
                wt_status_print_submodule_summary(s, 1);  /* unstaged */
        }
 -      if (s->show_untracked_files)
 -              wt_status_print_untracked(s);
 -      else if (s->commitable)
 +      if (s->show_untracked_files) {
 +              wt_status_print_other(s, &s->untracked, "Untracked", "add");
 +              if (s->show_ignored_files)
 +                      wt_status_print_other(s, &s->ignored, "Ignored", "add -f");
 +      } else if (s->commitable)
-                fprintf(s->fp, "# Untracked files not listed (use -u option to show untracked files)\n");
+               fprintf(s->fp, "# Untracked files not listed%s\n",
+                       advice_status_hints
+                       ? " (use -u option to show untracked files)" : "");
  
        if (s->verbose)
                wt_status_print_verbose(s);