aboutsummaryrefslogtreecommitdiff
path: root/builtin/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-11-20 10:40:46 -0800
committerJunio C Hamano <gitster@pobox.com>2012-11-20 10:40:46 -0800
commit0f76f976762d6a15a4af75db56208c8065492020 (patch)
treee77862b1d6d5f971b9bf9230117e066fd0618298 /builtin/config.c
parentb4f35513beb30ab2b1394440b8540627fe472a19 (diff)
parent962c38eedd931a608b5e675f12a21569d9f4d39f (diff)
downloadgit-0f76f976762d6a15a4af75db56208c8065492020.tar.gz
git-0f76f976762d6a15a4af75db56208c8065492020.tar.xz
Merge branch 'cn/config-missing-path'
"git config --path $key" segfaulted on "[section] key" (a boolean "true" spelled without "=", not "[section] key = true"). * cn/config-missing-path: config: don't segfault when given --path with a missing value
Diffstat (limited to 'builtin/config.c')
-rw-r--r--builtin/config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/config.c b/builtin/config.c
index e1c33e069..505bbc7dd 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -129,7 +129,8 @@ static int show_config(const char *key_, const char *value_, void *cb)
else
sprintf(value, "%d", v);
} else if (types == TYPE_PATH) {
- git_config_pathname(&vptr, key_, value_);
+ if (git_config_pathname(&vptr, key_, value_) < 0)
+ return -1;
must_free_vptr = 1;
} else if (value_) {
vptr = value_;