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>maint
parent
5768c98ab8
commit
d865eb2a0d
|
@ -743,6 +743,8 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
|
||||||
int git_commit_config(const char *k, const char *v)
|
int git_commit_config(const char *k, const char *v)
|
||||||
{
|
{
|
||||||
if (!strcmp(k, "commit.template")) {
|
if (!strcmp(k, "commit.template")) {
|
||||||
|
if (!v)
|
||||||
|
return config_error_nonbool(v);
|
||||||
template_file = xstrdup(v);
|
template_file = xstrdup(v);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue