@@ -732,11 +732,11 @@ void append_conflicts_hint(struct index_state *istate,
732732 }
733733
734734 strbuf_addch (msgbuf , '\n' );
735- strbuf_commented_addf (msgbuf , comment_line_str , "Conflicts:\n" );
735+ strbuf_comment_addf (msgbuf , "Conflicts:\n" );
736736 for (i = 0 ; i < istate -> cache_nr ;) {
737737 const struct cache_entry * ce = istate -> cache [i ++ ];
738738 if (ce_stage (ce )) {
739- strbuf_commented_addf (msgbuf , comment_line_str ,
739+ strbuf_comment_addf (msgbuf ,
740740 "\t%s\n" , ce -> name );
741741 while (i < istate -> cache_nr &&
742742 !strcmp (ce -> name , istate -> cache [i ]-> name ))
@@ -1912,7 +1912,7 @@ static int is_fixup_flag(enum todo_command command, unsigned flag)
19121912}
19131913
19141914/*
1915- * Wrapper around strbuf_add_commented_lines () which avoids double
1915+ * Wrapper around strbuf_add_comment_lines () which avoids double
19161916 * commenting commit subjects.
19171917 */
19181918static void add_commented_lines (struct strbuf * buf , const void * str , size_t len )
@@ -1929,7 +1929,7 @@ static void add_commented_lines(struct strbuf *buf, const void *str, size_t len)
19291929 s += count ;
19301930 len -= count ;
19311931 }
1932- strbuf_add_commented_lines (buf , s , len , comment_line_str );
1932+ strbuf_add_comment_lines (buf , s , len );
19331933}
19341934
19351935/* Does the current fixup chain contain a squash command? */
@@ -2029,7 +2029,7 @@ static int append_squash_message(struct strbuf *buf, const char *body,
20292029 strbuf_addf (buf , _ (nth_commit_msg_fmt ),
20302030 ++ ctx -> current_fixup_count + 1 );
20312031 strbuf_addstr (buf , "\n\n" );
2032- strbuf_add_commented_lines (buf , body , commented_len , comment_line_str );
2032+ strbuf_add_comment_lines (buf , body , commented_len );
20332033 /* buf->buf may be reallocated so store an offset into the buffer */
20342034 fixup_off = buf -> len ;
20352035 strbuf_addstr (buf , body + commented_len );
@@ -2120,8 +2120,7 @@ static int update_squash_messages(struct repository *r,
21202120 _ (first_commit_msg_str ));
21212121 strbuf_addstr (& buf , "\n\n" );
21222122 if (is_fixup_flag (command , flag ))
2123- strbuf_add_commented_lines (& buf , body , strlen (body ),
2124- comment_line_str );
2123+ strbuf_add_comment_lines (& buf , body , strlen (body ));
21252124 else
21262125 strbuf_addstr (& buf , body );
21272126
@@ -2140,8 +2139,7 @@ static int update_squash_messages(struct repository *r,
21402139 strbuf_addf (& buf , _ (skip_nth_commit_msg_fmt ),
21412140 ++ ctx -> current_fixup_count + 1 );
21422141 strbuf_addstr (& buf , "\n\n" );
2143- strbuf_add_commented_lines (& buf , body , strlen (body ),
2144- comment_line_str );
2142+ strbuf_add_comment_lines (& buf , body , strlen (body ));
21452143 } else
21462144 return error (_ ("unknown command: %d" ), command );
21472145 repo_unuse_commit_buffer (r , commit , message );
0 commit comments