summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-06-11 13:30:31 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-06-11 13:30:31 -0700
commitcb4d6c2b7d5b710b9108a39b2df5fcff77c65463 (patch)
treea0b0d733ce4273f4ee2631b6e4e905dc2408e573
parentMerge branch 'fc/do-not-use-the-index-in-add-to-index' (diff)
parentcredential-osxkeychain: support more protocols (diff)
downloadtgif-cb4d6c2b7d5b710b9108a39b2df5fcff77c65463.tar.xz
Merge branch 'xq/credential-osxkeychain'
* xq/credential-osxkeychain: credential-osxkeychain: support more protocols
-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);
}