1
0
mirror of https://github.com/git/git.git synced 2024-09-28 04:10:41 +02:00

submodule-config: correct error reporting for invalid ignore value

As 'var' contains the whole value we get error messages that repeat
the section and key currently:

warning: Invalid parameter 'true' for config option 'submodule.submodule.plugins/hooks.ignore.ignore'

Fix this by only giving the section name in the warning.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stefan Beller 2017-03-14 15:14:40 -07:00 committed by Junio C Hamano
parent 6ebdac1bab
commit 5ea304896e

View File

@ -331,7 +331,7 @@ static int parse_config(const char *var, const char *value, void *data)
strcmp(value, "all") &&
strcmp(value, "none"))
warning("Invalid parameter '%s' for config option "
"'submodule.%s.ignore'", value, var);
"'submodule.%s.ignore'", value, name.buf);
else {
free((void *) submodule->ignore);
submodule->ignore = xstrdup(value);