summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-02-04 10:23:49 -0800
committerJunio C Hamano <gitster@pobox.com>2013-02-04 10:23:49 -0800
commit149a4211a4b8d8bbcdd72685d538d6ac7365e29e (patch)
treef0e37272889876737f0216021ea8d23785763fa2 /wt-status.c
parentbcd45b4085f9269a536c8fb1963ac8380bfac0e8 (diff)
parenteff80a9fd990de3605063050dae32f969ef18ba8 (diff)
downloadgit-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 'wt-status.c')
-rw-r--r--wt-status.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/wt-status.c b/wt-status.c
index d7cfe8f31c..aa2734fcbe 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -45,7 +45,7 @@ static void status_vprintf(struct wt_status *s, int at_bol, const char *color,
strbuf_vaddf(&sb, fmt, ap);
if (!sb.len) {
- strbuf_addch(&sb, '#');
+ strbuf_addch(&sb, comment_line_char);
if (!trail)
strbuf_addch(&sb, ' ');
color_print_strbuf(s->fp, color, &sb);
@@ -59,7 +59,7 @@ static void status_vprintf(struct wt_status *s, int at_bol, const char *color,
strbuf_reset(&linebuf);
if (at_bol) {
- strbuf_addch(&linebuf, '#');
+ strbuf_addch(&linebuf, comment_line_char);
if (*line != '\n' && *line != '\t')
strbuf_addch(&linebuf, ' ');
}
@@ -762,8 +762,10 @@ static void wt_status_print_tracking(struct wt_status *s)
for (cp = sb.buf; (ep = strchr(cp, '\n')) != NULL; cp = ep + 1)
color_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s),
- "# %.*s", (int)(ep - cp), cp);
- color_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), "#");
+ "%c %.*s", comment_line_char,
+ (int)(ep - cp), cp);
+ color_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), "%c",
+ comment_line_char);
}
static int has_unmerged(struct wt_status *s)