Browse Source

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
Junio C Hamano 17 years ago
parent
commit
d865eb2a0d
  1. 2
      builtin-commit.c

2
builtin-commit.c

@ -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…
Cancel
Save