summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-11 13:30:31 -0700
committerJunio C Hamano <gitster@pobox.com>2013-06-11 13:30:31 -0700
commitcb4d6c2b7d5b710b9108a39b2df5fcff77c65463 (patch)
treea0b0d733ce4273f4ee2631b6e4e905dc2408e573 /contrib
parent6bf2227b92b9b8094e625e41b8e621cd6fdc7ee1 (diff)
parentde56ccf7999ca53370f44f252b780a970d639f9e (diff)
downloadgit-cb4d6c2b7d5b710b9108a39b2df5fcff77c65463.tar.gz
Merge branch 'xq/credential-osxkeychain'
* xq/credential-osxkeychain: credential-osxkeychain: support more protocols
Diffstat (limited to 'contrib')
-rw-r--r--contrib/credential/osxkeychain/git-credential-osxkeychain.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
index 3940202b36..bcd3f575a3 100644
--- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c
+++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
@@ -127,10 +127,20 @@ static void read_credential(void)
*v++ = '\0';
if (!strcmp(buf, "protocol")) {
- if (!strcmp(v, "https"))
+ if (!strcmp(v, "imap"))
+ protocol = kSecProtocolTypeIMAP;
+ else if (!strcmp(v, "imaps"))
+ protocol = kSecProtocolTypeIMAPS;
+ else if (!strcmp(v, "ftp"))
+ protocol = kSecProtocolTypeFTP;
+ else if (!strcmp(v, "ftps"))
+ protocol = kSecProtocolTypeFTPS;
+ 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);
}