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

[PATCH 1/2] help.c: use 'git_config_string' to get 'help_default_format'.

From
Christian Couder <chriscool@tuxfamily.org>
Date
Feb 17, 2008, 19:52 UTC
Message-ID
<20080217205250.a2b4c3c2.chriscool@tuxfamily.org>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 help.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/help.c b/help.c
index 6e28ad9..8143dcd 100644
--- a/help.c
+++ b/help.c
@@ -39,12 +39,8 @@ static void parse_help_format(const char *format)
 
 static int git_help_config(const char *var, const char *value)
 {
-	if (!strcmp(var, "help.format")) {
-		if (!value)
-			return config_error_nonbool(var);
-		help_default_format = xstrdup(value);
-		return 0;
-	}
+	if (!strcmp(var, "help.format"))
+		return git_config_string(&help_default_format, var, value);
 	return git_default_config(var, value);
 }
 
-- 
1.5.4.1.1384.gdeff
Message 1 of 1 in “help.c: use 'git_config_string' to get 'help_default_format'.”
  1. 1/2 help.c: use 'git_config_string' to get 'help_default_format'.Christian Couder, Feb 17, 2008

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.