git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] credential-osxkeychain: support more protocols
@ 2013-05-27  7:57 Xidorn Quan
  2013-05-27 10:27 ` John Szakmeister
  2013-05-27 14:35 ` [PATCH v2] " Xidorn Quan
  0 siblings, 2 replies; 10+ messages in thread
From: Xidorn Quan @ 2013-05-27  7:57 UTC (permalink / raw)
  To: git; +Cc: Xidorn Quan, Jeff King

Add protocol ftp, smtp, and ssh for credential-osxkeychain.
---
 contrib/credential/osxkeychain/git-credential-osxkeychain.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
index 3940202..4ddcfb3 100644
--- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c
+++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
@@ -127,10 +127,16 @@ 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 if (!strcmp(v, "ssh"))
+				protocol = kSecProtocolTypeSSH;
 			else /* we don't yet handle other protocols */
 				exit(0);
 		}
-- 
1.8.3

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

end of thread, other threads:[~2013-05-28  2:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-27  7:57 [PATCH] credential-osxkeychain: support more protocols Xidorn Quan
2013-05-27 10:27 ` John Szakmeister
2013-05-27 13:57   ` Xidorn Quan
     [not found]   ` <CAMdq6987TAj7f03mABkqu9v4wicarrZLYQypNUiOrP0fsLc4mQ@mail.gmail.com>
2013-05-27 14:28     ` John Szakmeister
2013-05-27 15:02       ` Xidorn Quan
2013-05-27 14:35 ` [PATCH v2] " Xidorn Quan
2013-05-27 15:08   ` Jeff King
2013-05-27 15:46     ` Xidorn Quan
2013-05-27 16:05       ` Jeff King
2013-05-28  2:36   ` [PATCH v3] " Xidorn Quan

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).