summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-11-20 11:40:29 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-11-20 11:40:29 -0800
commit62ce40d9338046a89de5d2bfb6b258872fd366c0 (patch)
treecaec918aacac7203a8d8c25145b412b9fed6a8cc /pretty.c
parentt4026: test "normal" color (diff)
parentcolor_parse: do not mention variable name in error message (diff)
downloadtgif-62ce40d9338046a89de5d2bfb6b258872fd366c0.tar.xz
Merge branch 'jn/parse-config-slot' into jk/colors
* jn/parse-config-slot: color_parse: do not mention variable name in error message pass config slots as pointers instead of offsets
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pretty.c b/pretty.c
index 31fc76b2fd..6182ca9aed 100644
--- a/pretty.c
+++ b/pretty.c
@@ -979,9 +979,8 @@ static size_t parse_color(struct strbuf *sb, /* in UTF-8 */
return end - placeholder + 1;
begin += 5;
}
- color_parse_mem(begin,
- end - begin,
- "--pretty format", color);
+ if (color_parse_mem(begin, end - begin, color) < 0)
+ die(_("unable to parse --pretty format"));
strbuf_addstr(sb, color);
return end - placeholder + 1;
}