@@ -889,7 +889,22 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
889
889
int ident_shown = 0 ;
890
890
int saved_color_setting ;
891
891
struct ident_split ci , ai ;
892
-
892
+ const char * hint_cleanup_all = allow_empty_message ?
893
+ _ ("Please enter the commit message for your changes."
894
+ " Lines starting\nwith '%c' will be ignored.\n" ) :
895
+ _ ("Please enter the commit message for your changes."
896
+ " Lines starting\nwith '%c' will be ignored, and an empty"
897
+ " message aborts the commit.\n" );
898
+ const char * hint_cleanup_space = allow_empty_message ?
899
+ _ ("Please enter the commit message for your changes."
900
+ " Lines starting\n"
901
+ "with '%c' will be kept; you may remove them"
902
+ " yourself if you want to.\n" ) :
903
+ _ ("Please enter the commit message for your changes."
904
+ " Lines starting\n"
905
+ "with '%c' will be kept; you may remove them"
906
+ " yourself if you want to.\n"
907
+ "An empty message aborts the commit.\n" );
893
908
if (whence != FROM_COMMIT ) {
894
909
if (cleanup_mode == COMMIT_MSG_CLEANUP_SCISSORS &&
895
910
!merge_contains_scissors )
@@ -911,20 +926,12 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
911
926
912
927
fprintf (s -> fp , "\n" );
913
928
if (cleanup_mode == COMMIT_MSG_CLEANUP_ALL )
914
- status_printf (s , GIT_COLOR_NORMAL ,
915
- _ ("Please enter the commit message for your changes."
916
- " Lines starting\nwith '%c' will be ignored, and an empty"
917
- " message aborts the commit.\n" ), comment_line_char );
929
+ status_printf (s , GIT_COLOR_NORMAL , hint_cleanup_all , comment_line_char );
918
930
else if (cleanup_mode == COMMIT_MSG_CLEANUP_SCISSORS ) {
919
931
if (whence == FROM_COMMIT && !merge_contains_scissors )
920
932
wt_status_add_cut_line (s -> fp );
921
933
} else /* COMMIT_MSG_CLEANUP_SPACE, that is. */
922
- status_printf (s , GIT_COLOR_NORMAL ,
923
- _ ("Please enter the commit message for your changes."
924
- " Lines starting\n"
925
- "with '%c' will be kept; you may remove them"
926
- " yourself if you want to.\n"
927
- "An empty message aborts the commit.\n" ), comment_line_char );
934
+ status_printf (s , GIT_COLOR_NORMAL , hint_cleanup_space , comment_line_char );
928
935
929
936
/*
930
937
* These should never fail because they come from our own
0 commit comments