aboutsummaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-11 10:44:49 -0800
committerJunio C Hamano <gitster@pobox.com>2008-02-11 13:11:36 -0800
commita0ed3e6adea2ca69b7f4a76ac771e39cc9fa272e (patch)
tree28de5619f5f67cb9a5d82be001f226c55ed823da /builtin-apply.c
parent40ea4ed9032a80c9dba706d6030bd11b08c35f4d (diff)
downloadgit-a0ed3e6adea2ca69b7f4a76ac771e39cc9fa272e.tar.gz
git-a0ed3e6adea2ca69b7f4a76ac771e39cc9fa272e.tar.xz
builtin-apply.c: guard config parser from value=NULL
apply.whitespace configuration expects a string value. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-apply.c')
-rw-r--r--builtin-apply.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index 15432b678..a11b1bbee 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -2746,6 +2746,8 @@ static int apply_patch(int fd, const char *filename, int inaccurate_eof)
static int git_apply_config(const char *var, const char *value)
{
if (!strcmp(var, "apply.whitespace")) {
+ if (!value)
+ return config_error_nonbool(var);
apply_default_whitespace = xstrdup(value);
return 0;
}