prefer comment_line_str to comment_line_char for printing
As part of our transition to multi-byte comment characters, we should use the string variable rather than the historical character variable. All of the sites adjusted here are just swapping out "%c" for "%s" in format strings, or strbuf_addch() for strbuf_addstr(). The type system and printf-attribute give the compiler enough information to make sure our formats and variable changes all match (especially important for cases where the format string is defined far away from its use, like prepare_to_commit() in commit.c). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a1bb146aaf
commit
f99e1d94f5
@ -321,7 +321,7 @@ static void credit_people(struct strbuf *out,
|
||||
skip_prefix(me, them->items->string, &me) &&
|
||||
starts_with(me, " <")))
|
||||
return;
|
||||
strbuf_addf(out, "\n%c %s ", comment_line_char, label);
|
||||
strbuf_addf(out, "\n%s %s ", comment_line_str, label);
|
||||
add_people_count(out, them);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user