@@ -646,9 +646,11 @@ void wt_status_print(struct wt_status *s)
646
646
wt_status_print_submodule_summary (s , 0 ); /* staged */
647
647
wt_status_print_submodule_summary (s , 1 ); /* unstaged */
648
648
}
649
- if (s -> show_untracked_files )
649
+ if (s -> show_untracked_files ) {
650
650
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 )
652
654
fprintf (s -> fp , "# Untracked files not listed (use -u option to show untracked files)\n" );
653
655
654
656
if (s -> verbose )
@@ -730,16 +732,16 @@ static void wt_shortstatus_status(int null_termination, struct string_list_item
730
732
}
731
733
}
732
734
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 )
735
737
{
736
738
if (null_termination ) {
737
- fprintf (stdout , "?? %s%c" , it -> string , 0 );
739
+ fprintf (stdout , "%s %s%c" , sign , it -> string , 0 );
738
740
} else {
739
741
struct strbuf onebuf = STRBUF_INIT ;
740
742
const char * one ;
741
743
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 );
743
745
printf (" %s\n" , one );
744
746
strbuf_release (& onebuf );
745
747
}
@@ -763,7 +765,13 @@ void wt_shortstatus_print(struct wt_status *s, int null_termination)
763
765
struct string_list_item * it ;
764
766
765
767
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 , "!!" );
767
775
}
768
776
}
769
777
0 commit comments