git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] builtin-apply.c: use git_config_string() to get apply_default_whitespace
@ 2008-04-08  8:42 Stephan Beyer
  2008-04-13  3:56 ` Christian Couder
  0 siblings, 1 reply; 4+ messages in thread
From: Stephan Beyer @ 2008-04-08  8:42 UTC (permalink / raw)
  To: git

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-15  4:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-08  8:42 [PATCH] builtin-apply.c: use git_config_string() to get apply_default_whitespace Stephan Beyer
2008-04-13  3:56 ` Christian Couder
2008-04-13  6:26   ` Re* " Junio C Hamano
2008-04-15  4:19     ` Christian Couder

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).