summaryrefslogtreecommitdiff
path: root/help.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-11 10:56:26 -0800
committerJunio C Hamano <gitster@pobox.com>2008-02-11 13:11:37 -0800
commitb51b2bb4c3da805727fd43219e3f817475ae52d3 (patch)
treed181005eec3faa42ef491b8ebf74e9e2e43e780d /help.c
parente08404a82d19a60fd60822e8c0d95dd5629e0809 (diff)
downloadgit-b51b2bb4c3da805727fd43219e3f817475ae52d3.tar.gz
help.c: guard config parser from value=NULL
help.format configuration expects a string value Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'help.c')
-rw-r--r--help.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/help.c b/help.c
index 1302a61c83..95e7640fed 100644
--- a/help.c
+++ b/help.c
@@ -40,6 +40,8 @@ static void parse_help_format(const char *format)
static int git_help_config(const char *var, const char *value)
{
if (!strcmp(var, "help.format")) {
+ if (!value)
+ return config_error_nonbool(var);
help_default_format = xstrdup(value);
return 0;
}