summaryrefslogtreecommitdiffstats
path: root/pretty.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-10-20 21:23:48 +0200
committerJunio C Hamano <gitster@pobox.com>2014-10-20 21:23:48 +0200
commitb94657683996402228abb1694a5db4792c424f9e (patch)
treea553b8703be639bf1af8c74946337a5ebe08529f /pretty.c
parentMerge branch 'rs/receive-pack-argv-leak-fix' (diff)
parentcolor_parse: do not mention variable name in error message (diff)
downloadgit-b94657683996402228abb1694a5db4792c424f9e.tar.xz
git-b94657683996402228abb1694a5db4792c424f9e.zip
Merge branch 'jn/parse-config-slot'
Code cleanup. * 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 a181ac6687..9d34d02db1 100644
--- a/pretty.c
+++ b/pretty.c
@@ -964,9 +964,8 @@ static size_t parse_color(struct strbuf *sb, /* in UTF-8 */
if (!want_color(c->pretty_ctx->color))
return end - placeholder + 1;
}
- 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;
}