Merge branch 'jk/core-comment-string'
core.commentChar used to be limited to a single byte, but has been updated to allow an arbitrary multi-byte sequence. * jk/core-comment-string: config: add core.commentString config: allow multi-byte core.commentChar environment: drop comment_line_char compatibility macro wt-status: drop custom comment-char stringification sequencer: handle multi-byte comment characters when writing todo list find multi-byte comment chars in unterminated buffers find multi-byte comment chars in NUL-terminated strings prefer comment_line_str to comment_line_char for printing strbuf: accept a comment string for strbuf_add_commented_lines() strbuf: accept a comment string for strbuf_commented_addf() strbuf: accept a comment string for strbuf_stripspace() environment: store comment_line_char as a string strbuf: avoid shadowing global comment_line_char name commit: refactor base-case of adjust_comment_line_char() strbuf: avoid static variables in strbuf_add_commented_lines() strbuf: simplify comment-handling in add_lines() helper config: forbid newline as core.commentChar
This commit is contained in:
3
commit.c
3
commit.c
@ -1928,7 +1928,8 @@ size_t ignored_log_message_bytes(const char *buf, size_t len)
|
||||
else
|
||||
next_line++;
|
||||
|
||||
if (buf[bol] == comment_line_char || buf[bol] == '\n') {
|
||||
if (starts_with_mem(buf + bol, cutoff - bol, comment_line_str) ||
|
||||
buf[bol] == '\n') {
|
||||
/* is this the first of the run of comments? */
|
||||
if (!boc)
|
||||
boc = bol;
|
||||
|
Reference in New Issue
Block a user