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>
Stefan Beller committed
Mar 14, 2017 at 15:14 UTC
5ea304896e1e2bfbf104c4098df70f93b5952cfa
1 file changed
+1
-1
submodule-config.c
+1
-1
@@ -331,7 +331,7 @@ static int parse_config(const char *var, const char *value, void *data)
331
strcmp(value, "all") &&
332
strcmp(value, "none"))
333
warning("Invalid parameter '%s' for config option "
334
- "'submodule.%s.ignore'", value, var);
334
+ "'submodule.%s.ignore'", value, name.buf);
335
else {
336
free((void *) submodule->ignore);
337
submodule->ignore = xstrdup(value);