File tree 1 file changed +10
-0
lines changed 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -885,11 +885,21 @@ static void abort_commit(const char *err_msg)
885
885
exit (1 );
886
886
}
887
887
888
+ static const char merge_editor_comment [] =
889
+ N_ ("Please enter a commit message to explain why this merge is necessary,\n"
890
+ "especially if it merges an updated upstream into a topic branch.\n"
891
+ "\n"
892
+ "Lines starting with '#' will be ignored, and an empty message aborts\n"
893
+ "the commit.\n" );
894
+
888
895
static void prepare_to_commit (void )
889
896
{
890
897
struct strbuf msg = STRBUF_INIT ;
898
+ const char * comment = _ (merge_editor_comment );
891
899
strbuf_addbuf (& msg , & merge_msg );
892
900
strbuf_addch (& msg , '\n' );
901
+ if (0 < option_edit )
902
+ strbuf_add_lines (& msg , "# " , comment , strlen (comment ));
893
903
write_merge_msg (& msg );
894
904
run_hook (get_index_file (), "prepare-commit-msg" ,
895
905
git_path ("MERGE_MSG" ), "merge" , NULL , NULL );
You can’t perform that action at this time.
0 commit comments