Code

help.c: guard config parser from value=NULL
authorJunio C Hamano <gitster@pobox.com>
Mon, 11 Feb 2008 18:56:26 +0000 (10:56 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 11 Feb 2008 21:11:37 +0000 (13:11 -0800)
help.format configuration expects a string value

Signed-off-by: Junio C Hamano <gitster@pobox.com>
help.c

diff --git a/help.c b/help.c
index 1302a61c83c524099e7d39257daa273a09edad4f..95e7640fedebb1574a4259d85d7b95d5220f0e6f 100644 (file)
--- 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;
        }