Re: [PATCH] submodule-config: correct error reporting for invalid ignore value
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 15, 2017, 18:29 UTC
- Message-ID
- <xmqqefxyfl6b.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170314221440.18259-1-sbeller@google.com>
Stefan Beller <sbeller@google.com> writes:
Show 22 quoted lines
> 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);Obviously correct. Nobody seems to have complained about this since it was first written in 2.6 days, which is a bit sad, though.
Thanks.