diff options
author | Jeff King <peff@peff.net> | 2024-03-12 05:17:29 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-03-12 13:28:10 -0700 |
commit | 3a35d96284b4a0551a350707df68f368947630d1 (patch) | |
tree | db81191984b7ea8220cf5559181def57c38e059d /strbuf.h | |
parent | 2982b65690d7a043275558c74202a89b0450cbf5 (diff) | |
download | git-3a35d96284b4a0551a350707df68f368947630d1.tar.gz |
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 'strbuf.h')
-rw-r--r-- | strbuf.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -379,7 +379,7 @@ void strbuf_addf(struct strbuf *sb, const char *fmt, ...); * blank to the buffer. */ __attribute__((format (printf, 3, 4))) -void strbuf_commented_addf(struct strbuf *sb, char comment_prefix, const char *fmt, ...); +void strbuf_commented_addf(struct strbuf *sb, const char *comment_prefix, const char *fmt, ...); __attribute__((format (printf,2,0))) void strbuf_vaddf(struct strbuf *sb, const char *fmt, va_list ap); |