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

[PATCH] builtin-apply.c: use git_config_string() to get apply_default_whitespace

From
Stephan Beyer <s-beyer@gmx.net>
Date
Apr 8, 2008, 08:42 UTC
Message-ID
<20080408084233.GA7785@leksak.fem-net>
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
---
Hi,
a simple `Janitor patch'.
Regards,
 Stephan.
 builtin-apply.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/builtin-apply.c b/builtin-apply.c
index b5f78ac..ce0a0c3 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -2978,12 +2978,8 @@ static int apply_patch(int fd, const char *filename, int inaccurate_eof)
 
 static int git_apply_config(const char *var, const char *value)
 {
-	if (!strcmp(var, "apply.whitespace")) {
-		if (!value)
-			return config_error_nonbool(var);
-		apply_default_whitespace = xstrdup(value);
-		return 0;
-	}
+	if (!strcmp(var, "apply.whitespace"))
+		return git_config_string(&apply_default_whitespace, var, value);
 	return git_default_config(var, value);
 }
 
-- 
1.5.5.rc3.8.g78d1a
Next: Christian Couder
Message 1 of 4 in “builtin-apply.c: use git_config_string() to get apply_default_whitespace”
  1. builtin-apply.c: use git_config_string() to get apply_default_whitespaceStephan Beyer, Apr 8, 2008
  2. Christian CouderApr 13, 2008
  3. Re* [PATCH] builtin-apply.c: use git_config_string() to get apply_default_whitespaceJunio C Hamano, Apr 13, 2008
  4. Christian CouderApr 15, 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.