convert.c: guard config parser from value=NULL
filter.*.smudge and filter.*.clean configuration variables expect a string value. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -326,14 +326,14 @@ static int read_convert_config(const char *var, const char *value)
|
|||||||
|
|
||||||
if (!strcmp("smudge", ep)) {
|
if (!strcmp("smudge", ep)) {
|
||||||
if (!value)
|
if (!value)
|
||||||
return error("%s: lacks value", var);
|
return config_error_nonbool(var);
|
||||||
drv->smudge = strdup(value);
|
drv->smudge = strdup(value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp("clean", ep)) {
|
if (!strcmp("clean", ep)) {
|
||||||
if (!value)
|
if (!value)
|
||||||
return error("%s: lacks value", var);
|
return config_error_nonbool(var);
|
||||||
drv->clean = strdup(value);
|
drv->clean = strdup(value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user