[PATCH] alias.c: use git_config_string() to get alias_val

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Stephan Beyer <s-beyer@xxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux