@@ -646,9 +646,11 @@ void wt_status_print(struct wt_status *s)
646646 wt_status_print_submodule_summary (s , 0 ); /* staged */
647647 wt_status_print_submodule_summary (s , 1 ); /* unstaged */
648648 }
649- if (s -> show_untracked_files )
649+ if (s -> show_untracked_files ) {
650650 wt_status_print_other (s , & s -> untracked , "Untracked" , "add" );
651- else if (s -> commitable )
651+ if (s -> show_ignored_files )
652+ wt_status_print_other (s , & s -> ignored , "Ignored" , "add -f" );
653+ } else if (s -> commitable )
652654 fprintf (s -> fp , "# Untracked files not listed (use -u option to show untracked files)\n" );
653655
654656 if (s -> verbose )
@@ -730,16 +732,16 @@ static void wt_shortstatus_status(int null_termination, struct string_list_item
730732 }
731733}
732734
733- static void wt_shortstatus_untracked (int null_termination , struct string_list_item * it ,
734- struct wt_status * s )
735+ static void wt_shortstatus_other (int null_termination , struct string_list_item * it ,
736+ struct wt_status * s , const char * sign )
735737{
736738 if (null_termination ) {
737- fprintf (stdout , "?? %s%c" , it -> string , 0 );
739+ fprintf (stdout , "%s %s%c" , sign , it -> string , 0 );
738740 } else {
739741 struct strbuf onebuf = STRBUF_INIT ;
740742 const char * one ;
741743 one = quote_path (it -> string , -1 , & onebuf , s -> prefix );
742- color_fprintf (s -> fp , color (WT_STATUS_UNTRACKED , s ), "??" );
744+ color_fprintf (s -> fp , color (WT_STATUS_UNTRACKED , s ), sign );
743745 printf (" %s\n" , one );
744746 strbuf_release (& onebuf );
745747 }
@@ -763,7 +765,13 @@ void wt_shortstatus_print(struct wt_status *s, int null_termination)
763765 struct string_list_item * it ;
764766
765767 it = & (s -> untracked .items [i ]);
766- wt_shortstatus_untracked (null_termination , it , s );
768+ wt_shortstatus_other (null_termination , it , s , "??" );
769+ }
770+ for (i = 0 ; i < s -> ignored .nr ; i ++ ) {
771+ struct string_list_item * it ;
772+
773+ it = & (s -> ignored .items [i ]);
774+ wt_shortstatus_other (null_termination , it , s , "!!" );
767775 }
768776}
769777
0 commit comments