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

[PATCH v2] credential-osxkeychain: support more protocols

From
Xidorn Quan <quanxunzhen@gmail.com>
Date
May 27, 2013, 14:35 UTC
Message-ID
<1369665359-48242-1-git-send-email-quanxunzhen@gmail.com>
In-Reply-To
<1369641431-44504-1-git-send-email-quanxunzhen@gmail.com>
Add protocol ftp and smtp for credential-osxkeychain.
Acked-by: John Szakmeister <john@szakmeister.net>
Signed-off-by: Xidorn Quan <quanxunzhen@gmail.com>
---
 contrib/credential/osxkeychain/git-credential-osxkeychain.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
index 3940202..648fadd 100644
--- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c
+++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
@@ -127,10 +127,14 @@ static void read_credential(void)
 		*v++ = '\0';
 
 		if (!strcmp(buf, "protocol")) {
-			if (!strcmp(v, "https"))
+			if (!strcmp(v, "ftp"))
+				protocol = kSecProtocolTypeFTP;
+			else if (!strcmp(v, "https"))
 				protocol = kSecProtocolTypeHTTPS;
 			else if (!strcmp(v, "http"))
 				protocol = kSecProtocolTypeHTTP;
+			else if (!strcmp(v, "smtp"))
+				protocol = kSecProtocolTypeSMTP;
 			else /* we don't yet handle other protocols */
 				exit(0);
 		}
-- 
1.8.3
Previous: Xidorn QuanNext: Jeff King
Message 4 of 10 in “credential-osxkeychain: support more protocols”
  1. credential-osxkeychain: support more protocolsXidorn Quan, May 27, 2013
  2. John SzakmeisterMay 27, 2013
  3. Xidorn QuanMay 27, 2013
  4. credential-osxkeychain: support more protocolsXidorn Quan, May 27, 2013
  5. Jeff KingMay 27, 2013
  6. Xidorn QuanMay 27, 2013
  7. Jeff KingMay 27, 2013
  8. credential-osxkeychain: support more protocolsXidorn Quan, May 28, 2013
  9. John SzakmeisterMay 27, 2013
  10. Xidorn QuanMay 27, 2013

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.