@@ -651,7 +651,9 @@ void wt_status_print(struct wt_status *s)
651
651
if (s -> show_ignored_files )
652
652
wt_status_print_other (s , & s -> ignored , "Ignored" , "add -f" );
653
653
} 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)" : "" );
655
657
656
658
if (s -> verbose )
657
659
wt_status_print_verbose (s );
@@ -661,15 +663,22 @@ void wt_status_print(struct wt_status *s)
661
663
else if (s -> nowarn )
662
664
; /* nothing */
663
665
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\")" : "" );
665
669
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)" : "" );
667
673
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)" : "" );
669
676
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)" : "" );
671
679
else
672
- printf ("nothing to commit (working directory clean)\n" );
680
+ printf ("nothing to commit%s\n" , advice_status_hints
681
+ ? " (working directory clean)" : "" );
673
682
}
674
683
}
675
684
0 commit comments