Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

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

From: Christian Couder <hidden>
Date: 2016-06-15 22:44:28

Le mardi 8 avril 2008, Stephan Beyer a écrit :
Signed-off-by: Stephan Beyer <redacted>
---
Hi,

a simple `Janitor patch'.
Thanks.
quoted hunk ↗ jump to hunk
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
Tested-by: Christian Couder <redacted>

Junio, please apply.

Thanks,
Christian.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help