Skip to content

Commit

Permalink
builtin-commit.c: guard config parser from value=NULL
Browse files Browse the repository at this point in the history
commit.template configuration expects a string value.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Feb 11, 2008
1 parent 5768c98 commit d865eb2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builtin-commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
if (!strcmp(k, "commit.template")) {
if (!v)
return config_error_nonbool(v);
template_file = xstrdup(v);
return 0;
}
Expand Down

0 comments on commit d865eb2

Please sign in to comment.