diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-02-04 10:23:49 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-02-04 10:23:49 -0800 |
commit | 149a4211a4b8d8bbcdd72685d538d6ac7365e29e (patch) | |
tree | f0e37272889876737f0216021ea8d23785763fa2 /builtin/branch.c | |
parent | bcd45b4085f9269a536c8fb1963ac8380bfac0e8 (diff) | |
parent | eff80a9fd990de3605063050dae32f969ef18ba8 (diff) | |
download | git-149a4211a4b8d8bbcdd72685d538d6ac7365e29e.tar.gz |
Merge branch 'jc/custom-comment-char'
Allow a configuration variable core.commentchar to customize the
character used to comment out the hint lines in the edited text from
the default '#'.
* jc/custom-comment-char:
Allow custom "comment char"
Diffstat (limited to 'builtin/branch.c')
-rw-r--r-- | builtin/branch.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/branch.c b/builtin/branch.c index ea6498b08a..77b435825c 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -706,11 +706,11 @@ static int edit_branch_description(const char *branch_name) read_branch_desc(&buf, branch_name); if (!buf.len || buf.buf[buf.len-1] != '\n') strbuf_addch(&buf, '\n'); - strbuf_addf(&buf, - "# Please edit the description for the branch\n" - "# %s\n" - "# Lines starting with '#' will be stripped.\n", - branch_name); + strbuf_commented_addf(&buf, + "Please edit the description for the branch\n" + " %s\n" + "Lines starting with '%c' will be stripped.\n", + branch_name, comment_line_char); fp = fopen(git_path(edit_description), "w"); if ((fwrite(buf.buf, 1, buf.len, fp) < buf.len) || fclose(fp)) { strbuf_release(&buf); |