git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] alias.c: use git_config_string() to get alias_val
@ 2008-04-05 12:18 Stephan Beyer
  2008-04-05 16:19 ` Christian Couder
  0 siblings, 1 reply; 6+ messages in thread
From: Stephan Beyer @ 2008-04-05 12:18 UTC (permalink / raw)
  To: git

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
---
Hi,

This is a `Janitor patch' to get involved ;-)
See
	http://git.or.cz/gitwiki/Janitor

It does not (at least, should not) change any functionality and
it has been tested using some aliases.

Regards,
Stephan

 alias.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/alias.c b/alias.c
index 116cac8..ac88d38 100644
--- a/alias.c
+++ b/alias.c
@@ -4,12 +4,8 @@ static const char *alias_key;
 static char *alias_val;
 static int alias_lookup_cb(const char *k, const char *v)
 {
-	if (!prefixcmp(k, "alias.") && !strcmp(k+6, alias_key)) {
-		if (!v)
-			return config_error_nonbool(k);
-		alias_val = xstrdup(v);
-		return 0;
-	}
+	if (!prefixcmp(k, "alias.") && !strcmp(k+6, alias_key))
+		return git_config_string((const char**)&alias_val, k, v);
 	return 0;
 }
 
-- 
1.5.4.4

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

end of thread, other threads:[~2008-04-06 13:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-05 12:18 [PATCH] alias.c: use git_config_string() to get alias_val Stephan Beyer
2008-04-05 16:19 ` Christian Couder
2008-04-05 17:39   ` Stephan Beyer
2008-04-06  5:49     ` Christian Couder
2008-04-06 11:02       ` Stephan Beyer
2008-04-06 13:29         ` 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).