builtin-commit.c: guard config parser from value=NULL
commit.template configuration expects a string value. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Feb 11, 2008 at 10:46 UTC
d865eb2a0d5f121a46dfcc18c78e7f27e0af0fbc
1 file changed
+2
builtin-commit.c
+2
@@ -743,6 +743,8 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
743
int git_commit_config(const char *k, const char *v)
744
{
745
if (!strcmp(k, "commit.template")) {
746
+ if (!v)
747
+ return config_error_nonbool(v);
748
template_file = xstrdup(v);
749
return 0;
750
}