git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Do not add an empty value from config credential.helper

From
乙酸鋰 <ch3cooli@gmail.com>
Date
Nov 10, 2012, 15:08 UTC
Message-ID
<CAHtLG6Snuv4x+xvqJRmEo8b8TJRPqBP46kanSsfvhgDWfDbuOg@mail.gmail.com>

Below is current git message when a local config credential.helper has an empty value. Please skip an empty value.

$ git push --force origin master git: 'credential-' is not a git command. See 'git --help'.

Did you mean this?
        credential
Total 0 (delta 0), reused 0 (delta 0)
To https://user@github.com/user/myrepo.git
 + d23aa6a...3405990 master -> master (forced update)
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
Message 1 of 1 in “Do not add an empty value from config credential.helper”
  1. 乙酸鋰Nov 10, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.