summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-11 18:56:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-11 21:11:37 (GMT)
commitb51b2bb4c3da805727fd43219e3f817475ae52d3 (patch)
treed181005eec3faa42ef491b8ebf74e9e2e43e780d
parente08404a82d19a60fd60822e8c0d95dd5629e0809 (diff)
downloadgit-b51b2bb4c3da805727fd43219e3f817475ae52d3.zip
git-b51b2bb4c3da805727fd43219e3f817475ae52d3.tar.gz
git-b51b2bb4c3da805727fd43219e3f817475ae52d3.tar.bz2
help.c: guard config parser from value=NULL
help.format configuration expects a string value Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--help.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/help.c b/help.c
index 1302a61..95e7640 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;
}