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>
This commit is contained in:
parent
40ea4ed903
commit
a0ed3e6ade
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user