git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] submodule-config: correct error reporting for invalid ignore value
@ 2017-03-14 22:14 Stefan Beller
  2017-03-15 18:29 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Beller @ 2017-03-14 22:14 UTC (permalink / raw)
  To: gitster; +Cc: git, Stefan Beller

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>
---
 submodule-config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/submodule-config.c b/submodule-config.c
index 93453909cf..bb069bc097 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -333,7 +333,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);
-- 
2.12.0.264.gd6db3f2165.dirty


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-15 20:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-14 22:14 [PATCH] submodule-config: correct error reporting for invalid ignore value Stefan Beller
2017-03-15 18:29 ` Junio C Hamano
2017-03-15 18:39   ` Stefan Beller
2017-03-15 19:52   ` Junio C Hamano
2017-03-15 20:21     ` Stefan Beller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).