Re: [PATCH] Having keywords without value is not a global error.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 26, 2010, 05:14 UTC
- Message-ID
- <7vk4u0efxy.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <c28821e9079f35e7267a1e7381ccf7793c12bf24.1267156694.git.sdrake@xnet.co.nz>
Steven Drake <sdrake@xnet.co.nz> writes:
Show 25 quoted lines
> It is not a good Idea to give a config_error for _any_ keyword without a
> value as it means that
>
> [section]
> keyword
>
> sytle can not be using for setting bool type keyword.
>
> Signed-off-by: Steven Drake <sdrake@xnet.co.nz>
> ---
> builtin/init-db.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/builtin/init-db.c b/builtin/init-db.c
> index 9273942..edc40ff 100644
> --- a/builtin/init-db.c
> +++ b/builtin/init-db.c
> @@ -170,8 +170,6 @@ static void copy_templates(const char *template_dir)
>
> static int git_init_db_config(const char *k, const char *v, void *cb)
> {
> - if (!v)
> - return config_error_nonbool(k);
> if (!strcmp(k, "init.templatedir"))
> return git_config_pathname(&init_db_template_dir, k, v);But then don't you need to catch init.templatedir does have a string value?
> > -- > 1.6.6