Skip to content

Commit

Permalink
Merge branch 'xq/credential-osxkeychain'
Browse files Browse the repository at this point in the history
* xq/credential-osxkeychain:
  credential-osxkeychain: support more protocols
  • Loading branch information
Junio C Hamano committed Jun 11, 2013
2 parents 6bf2227 + de56ccf commit cb4d6c2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion contrib/credential/osxkeychain/git-credential-osxkeychain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit cb4d6c2

Please sign in to comment.