@@ -651,7 +651,9 @@ void wt_status_print(struct wt_status *s)
651651 if (s -> show_ignored_files )
652652 wt_status_print_other (s , & s -> ignored , "Ignored" , "add -f" );
653653 } else if (s -> commitable )
654- fprintf (s -> fp , "# Untracked files not listed (use -u option to show untracked files)\n" );
654+ fprintf (s -> fp , "# Untracked files not listed%s\n" ,
655+ advice_status_hints
656+ ? " (use -u option to show untracked files)" : "" );
655657
656658 if (s -> verbose )
657659 wt_status_print_verbose (s );
@@ -661,15 +663,22 @@ void wt_status_print(struct wt_status *s)
661663 else if (s -> nowarn )
662664 ; /* nothing */
663665 else if (s -> workdir_dirty )
664- printf ("no changes added to commit (use \"git add\" and/or \"git commit -a\")\n" );
666+ printf ("no changes added to commit%s\n" ,
667+ advice_status_hints
668+ ? " (use \"git add\" and/or \"git commit -a\")" : "" );
665669 else if (s -> untracked .nr )
666- printf ("nothing added to commit but untracked files present (use \"git add\" to track)\n" );
670+ printf ("nothing added to commit but untracked files present%s\n" ,
671+ advice_status_hints
672+ ? " (use \"git add\" to track)" : "" );
667673 else if (s -> is_initial )
668- printf ("nothing to commit (create/copy files and use \"git add\" to track)\n" );
674+ printf ("nothing to commit%s\n" , advice_status_hints
675+ ? " (create/copy files and use \"git add\" to track)" : "" );
669676 else if (!s -> show_untracked_files )
670- printf ("nothing to commit (use -u to show untracked files)\n" );
677+ printf ("nothing to commit%s\n" , advice_status_hints
678+ ? " (use -u to show untracked files)" : "" );
671679 else
672- printf ("nothing to commit (working directory clean)\n" );
680+ printf ("nothing to commit%s\n" , advice_status_hints
681+ ? " (working directory clean)" : "" );
673682 }
674683}
675684
0 commit comments