diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-07-06 11:54:46 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-07-06 11:54:46 -0700 |
| commit | 67e7305e64fea8d15879e9dc3831fc8e31cfe619 (patch) | |
| tree | d8ed9ee0a2b54f3df4619af5757d938bb5247986 /builtin/branch.c | |
| parent | Merge branch 'rs/strbuf-expand-step' (diff) | |
| parent | strbuf: remove global variable (diff) | |
| download | git-67e7305e64fea8d15879e9dc3831fc8e31cfe619.tar.gz git-67e7305e64fea8d15879e9dc3831fc8e31cfe619.zip | |
Merge branch 'cw/strbuf-cleanup'
Move functions that are not about pure string manipulation out of
strbuf.[ch]
* cw/strbuf-cleanup:
strbuf: remove global variable
path: move related function to path
object-name: move related functions to object-name
credential-store: move related functions to credential-store file
abspath: move related functions to abspath
strbuf: clarify dependency
strbuf: clarify API boundary
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 2fa7b2bd64..afc5388e7b 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -665,7 +665,7 @@ static int edit_branch_description(const char *branch_name) exists = !read_branch_desc(&buf, branch_name); if (!buf.len || buf.buf[buf.len-1] != '\n') strbuf_addch(&buf, '\n'); - strbuf_commented_addf(&buf, + strbuf_commented_addf(&buf, comment_line_char, _("Please edit the description for the branch\n" " %s\n" "Lines starting with '%c' will be stripped.\n"), @@ -676,7 +676,7 @@ static int edit_branch_description(const char *branch_name) strbuf_release(&buf); return -1; } - strbuf_stripspace(&buf, 1); + strbuf_stripspace(&buf, comment_line_char); strbuf_addf(&name, "branch.%s.description", branch_name); if (buf.len || exists) |
