Browse Source

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

2
builtin-apply.c

@ -2746,6 +2746,8 @@ static int apply_patch(int fd, const char *filename, int inaccurate_eof) @@ -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…
Cancel
Save