From 3a35d96284b4a0551a350707df68f368947630d1 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 12 Mar 2024 05:17:29 -0400 Subject: strbuf: accept a comment string for strbuf_commented_addf() As part of our transition to multi-byte comment characters, let's take a NUL-terminated string pointer for strbuf_commented_addf() rather than a single character. All of the callers have to be adjusted, but they can just pass comment_line_str rather than comment_line_char. Note that we rely on strbuf_add_commented_lines() under the hood, so we'll cheat a bit to squeeze our string into a single character (for now the two are equivalent, and we'll address this TODO in the next patch). Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- rebase-interactive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rebase-interactive.c') diff --git a/rebase-interactive.c b/rebase-interactive.c index 6dfc33e4e3..affc93a8e4 100644 --- a/rebase-interactive.c +++ b/rebase-interactive.c @@ -71,7 +71,7 @@ void append_todo_help(int command_count, if (!edit_todo) { strbuf_addch(buf, '\n'); - strbuf_commented_addf(buf, comment_line_char, + strbuf_commented_addf(buf, comment_line_str, Q_("Rebase %s onto %s (%d command)", "Rebase %s onto %s (%d commands)", command_count), -- cgit v1.2.3