diff options
| author | Jeff King <peff@peff.net> | 2024-03-12 05:17:34 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-03-12 13:28:10 -0700 |
| commit | f99e1d94f5ed72fd7c5115a814b1087fde919fe5 (patch) | |
| tree | 4993814ec63e24425c428658406c9bc76ab4d240 /builtin/branch.c | |
| parent | a1bb146aaf551db4ff9b4aafaaa2f7a9f9574f93 (diff) | |
| download | git-f99e1d94f5ed72fd7c5115a814b1087fde919fe5.tar.gz | |
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>
Diffstat (limited to 'builtin/branch.c')
| -rw-r--r-- | builtin/branch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/branch.c b/builtin/branch.c index 8904a1e5d9..1cdcae8454 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -670,8 +670,8 @@ static int edit_branch_description(const char *branch_name) strbuf_commented_addf(&buf, comment_line_str, _("Please edit the description for the branch\n" " %s\n" - "Lines starting with '%c' will be stripped.\n"), - branch_name, comment_line_char); + "Lines starting with '%s' will be stripped.\n"), + branch_name, comment_line_str); write_file_buf(edit_description(), buf.buf, buf.len); strbuf_reset(&buf); if (launch_editor(edit_description(), &buf, NULL)) { |
