Skip to content

Commit 51eeaea

Browse files
committed
Merge branch 'ta/pretty-parse-config'
* ta/pretty-parse-config: pretty.c: make git_pretty_formats_config return -1 on git_config_string failure
2 parents 4740891 + a26bc61 commit 51eeaea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pretty.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ static int git_pretty_formats_config(const char *var, const char *value, void *c
7070

7171
commit_format->name = xstrdup(name);
7272
commit_format->format = CMIT_FMT_USERFORMAT;
73-
git_config_string(&fmt, var, value);
73+
if (git_config_string(&fmt, var, value))
74+
return -1;
75+
7476
if (starts_with(fmt, "format:") || starts_with(fmt, "tformat:")) {
7577
commit_format->is_tformat = fmt[0] == 't';
7678
fmt = strchr(fmt, ':') + 1;

0 commit comments

Comments
 (0)