summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pretty.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pretty.c b/pretty.c
index f64ff9a10c..d3c2224de6 100644
--- a/pretty.c
+++ b/pretty.c
@@ -66,7 +66,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;