summaryrefslogtreecommitdiff
path: root/builtin-commit.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-02-11 10:46:39 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-02-11 13:11:36 -0800
commitd865eb2a0d5f121a46dfcc18c78e7f27e0af0fbc (patch)
tree49188f682a6efe638df290b65d2c25265dfd5e83 /builtin-commit.c
parentbuiltin-branch.c: guard config parser from value=NULL (diff)
downloadtgif-d865eb2a0d5f121a46dfcc18c78e7f27e0af0fbc.tar.xz
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>
Diffstat (limited to 'builtin-commit.c')
-rw-r--r--builtin-commit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index 3a47275b8c..a43f201995 100644
--- a/builtin-commit.c
+++ b/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)
{
if (!strcmp(k, "commit.template")) {
+ if (!v)
+ return config_error_nonbool(v);
template_file = xstrdup(v);
return 0;
}