t1007: add hash-object --literally tests
[gitweb.git] / pretty.c
index 31fc76b2fde8297298a7d9ffd38ea7f00eede2fa..44b9f643725c68325a9caf92dff819e22e38e3ad 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -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;