summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-02 13:27:39 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-02 13:27:40 -0700
commit51eeaea2108a4105542fe03935b411dfdbf5fe2b (patch)
tree1f4970c473bcbb957d9f445aab0bb55e94989a05 /pretty.c
parent4740891e47de5ee33d91ffa3fdde25e8f0c4af74 (diff)
parenta26bc613a64ac2c7ee69a50675e61b004a26382d (diff)
downloadgit-51eeaea2108a4105542fe03935b411dfdbf5fe2b.tar.gz
Merge branch 'ta/pretty-parse-config'
* ta/pretty-parse-config: pretty.c: make git_pretty_formats_config return -1 on git_config_string failure
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pretty.c b/pretty.c
index 31fc76b2fd..44b9f64372 100644
--- 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;