git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Having keywords without value is not a global error.

From
SDSteven Drake <sdrake@xnet.co.nz>
Date
Feb 26, 2010, 04:00 UTC
Message-ID
<c28821e9079f35e7267a1e7381ccf7793c12bf24.1267156694.git.sdrake@xnet.co.nz>

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
Next: Steven Drake
Message 1 of 7 in “Having keywords without value is not a global error.”
  1. Having keywords without value is not a global error.Steven Drake, Feb 26, 2010
  2. t/t0001-init.sh: add test for 'init with init.templatedir set'Steven Drake, Feb 26, 2010
  3. Junio C HamanoFeb 26, 2010
  4. Steven DrakeFeb 26, 2010
  5. Junio C HamanoFeb 26, 2010
  6. Alex RiesenFeb 26, 2010
  7. Steven DrakeFeb 26, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.