From 0b3ec07ed893a0d595cf48c55d884ff844f1108f Mon Sep 17 00:00:00 2001
From: Sup Yut Sum <ch3cooli@gmail.com>
Date: Sat, 10 Nov 2012 22:24:30 +0800
Subject: [PATCH] credential: do not recognize a credential helper if config
 value is empty

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>
---
 credential.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/credential.c b/credential.c
index e54753c..1489e7a 100644
--- a/credential.c
+++ b/credential.c
@@ -64,7 +64,7 @@ static int credential_config_callback(const char *var, const char *value,
 		key = dot + 1;
 	}
 
-	if (!strcmp(key, "helper"))
+	if (!strcmp(key, "helper") && *value)
 		string_list_append(&c->helpers, value);
 	else if (!strcmp(key, "username")) {
 		if (!c->username)
-- 
1.8.0.msysgit.0

