Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'ta/pretty-parse-config'
* ta/pretty-parse-config:
  pretty.c: make git_pretty_formats_config return -1 on git_config_string failure
  • Loading branch information
Junio C Hamano committed Sep 2, 2014
2 parents 4740891 + a26bc61 commit 51eeaea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pretty.c
Expand Up @@ -70,7 +70,9 @@ static int git_pretty_formats_config(const char *var, const char *value, void *c

commit_format->name = xstrdup(name);
commit_format->format = CMIT_FMT_USERFORMAT;
git_config_string(&fmt, var, value);
if (git_config_string(&fmt, var, value))
return -1;

if (starts_with(fmt, "format:") || starts_with(fmt, "tformat:")) {
commit_format->is_tformat = fmt[0] == 't';
fmt = strchr(fmt, ':') + 1;
Expand Down

0 comments on commit 51eeaea

Please sign in to comment.