git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Stefan Beller <sbeller@google.com>
Subject: [PATCH] submodule-config: correct error reporting for invalid ignore value
Date: Tue, 14 Mar 2017 15:14:40 -0700	[thread overview]
Message-ID: <20170314221440.18259-1-sbeller@google.com> (raw)

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


             reply	other threads:[~2017-03-14 22:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 22:14 Stefan Beller [this message]
2017-03-15 18:29 ` [PATCH] submodule-config: correct error reporting for invalid ignore value 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170314221440.18259-1-sbeller@google.com \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).