@@ -889,7 +889,22 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
889889 int ident_shown = 0 ;
890890 int saved_color_setting ;
891891 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" );
893908 if (whence != FROM_COMMIT ) {
894909 if (cleanup_mode == COMMIT_MSG_CLEANUP_SCISSORS &&
895910 !merge_contains_scissors )
@@ -911,20 +926,12 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
911926
912927 fprintf (s -> fp , "\n" );
913928 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 );
918930 else if (cleanup_mode == COMMIT_MSG_CLEANUP_SCISSORS ) {
919931 if (whence == FROM_COMMIT && !merge_contains_scissors )
920932 wt_status_add_cut_line (s -> fp );
921933 } 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 );
928935
929936 /*
930937 * These should never fail because they come from our own
0 commit comments