@@ -625,7 +625,9 @@ void wt_status_print(struct wt_status *s)
625625 if (s -> show_untracked_files )
626626 wt_status_print_untracked (s );
627627 else if (s -> commitable )
628- fprintf (s -> fp , "# Untracked files not listed (use -u option to show untracked files)\n" );
628+ fprintf (s -> fp , "# Untracked files not listed%s\n" ,
629+ advice_status_hints
630+ ? " (use -u option to show untracked files)" : "" );
629631
630632 if (s -> verbose )
631633 wt_status_print_verbose (s );
@@ -635,15 +637,22 @@ void wt_status_print(struct wt_status *s)
635637 else if (s -> nowarn )
636638 ; /* nothing */
637639 else if (s -> workdir_dirty )
638- printf ("no changes added to commit (use \"git add\" and/or \"git commit -a\")\n" );
640+ printf ("no changes added to commit%s\n" ,
641+ advice_status_hints
642+ ? " (use \"git add\" and/or \"git commit -a\")" : "" );
639643 else if (s -> untracked .nr )
640- printf ("nothing added to commit but untracked files present (use \"git add\" to track)\n" );
644+ printf ("nothing added to commit but untracked files present%s\n" ,
645+ advice_status_hints
646+ ? " (use \"git add\" to track)" : "" );
641647 else if (s -> is_initial )
642- printf ("nothing to commit (create/copy files and use \"git add\" to track)\n" );
648+ printf ("nothing to commit%s\n" , advice_status_hints
649+ ? " (create/copy files and use \"git add\" to track)" : "" );
643650 else if (!s -> show_untracked_files )
644- printf ("nothing to commit (use -u to show untracked files)\n" );
651+ printf ("nothing to commit%s\n" , advice_status_hints
652+ ? " (use -u to show untracked files)" : "" );
645653 else
646- printf ("nothing to commit (working directory clean)\n" );
654+ printf ("nothing to commit%s\n" , advice_status_hints
655+ ? " (working directory clean)" : "" );
647656 }
648657}
649658
0 commit comments