git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Drake <sdrake@xnet.co.nz>
To: git@vger.kernel.org
Subject: [PATCH] Having keywords without value is not a global error.
Date: Fri, 26 Feb 2010 17:00:20 +1300	[thread overview]
Message-ID: <c28821e9079f35e7267a1e7381ccf7793c12bf24.1267156694.git.sdrake@xnet.co.nz> (raw)

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);
 
-- 
1.6.6

             reply	other threads:[~2010-02-26  4:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26  4:00 Steven Drake [this message]
2010-02-26  4:00 ` [PATCH] t/t0001-init.sh: add test for 'init with init.templatedir set' Steven Drake
2010-02-26  5:14 ` [PATCH] Having keywords without value is not a global error Junio C Hamano
2010-02-26  5:44   ` Steven Drake
2010-02-26  5:57     ` Junio C Hamano
2010-02-26  8:19 ` Alex Riesen
2010-02-26  8:35   ` Steven Drake

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

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

  git send-email \
    --in-reply-to=c28821e9079f35e7267a1e7381ccf7793c12bf24.1267156694.git.sdrake@xnet.co.nz \
    --to=sdrake@xnet.co.nz \
    --cc=git@vger.kernel.org \
    /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.
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).