diff options
author | Jeff King <peff@peff.net> | 2024-03-12 10:17:29 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-03-12 21:28:10 +0100 |
commit | 3a35d96284b4a0551a350707df68f368947630d1 (patch) | |
tree | db81191984b7ea8220cf5559181def57c38e059d /sequencer.c | |
parent | strbuf: accept a comment string for strbuf_stripspace() (diff) | |
download | git-3a35d96284b4a0551a350707df68f368947630d1.tar.xz git-3a35d96284b4a0551a350707df68f368947630d1.zip |
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sequencer.c b/sequencer.c index 6a1b7b200e..852c3f9f4e 100644 --- a/sequencer.c +++ b/sequencer.c @@ -667,11 +667,11 @@ void append_conflicts_hint(struct index_state *istate, } strbuf_addch(msgbuf, '\n'); - strbuf_commented_addf(msgbuf, comment_line_char, "Conflicts:\n"); + strbuf_commented_addf(msgbuf, comment_line_str, "Conflicts:\n"); for (i = 0; i < istate->cache_nr;) { const struct cache_entry *ce = istate->cache[i++]; if (ce_stage(ce)) { - strbuf_commented_addf(msgbuf, comment_line_char, + strbuf_commented_addf(msgbuf, comment_line_str, "\t%s\n", ce->name); while (i < istate->cache_nr && !strcmp(ce->name, istate->cache[i]->name)) |