git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] credential-osxkeychain: support more protocols
@ 2013-05-31  4:07 Xidorn Quan
  2013-06-02 19:46 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Xidorn Quan @ 2013-05-31  4:07 UTC (permalink / raw)
  To: gitster; +Cc: Xidorn Quan, git

Add protocol imap, imaps, ftp and smtp for credential-osxkeychain.

Signed-off-by: Xidorn Quan <quanxunzhen@gmail.com>
Acked-by: John Szakmeister <john@szakmeister.net>
Acked-by: Jeff King <peff@peff.net>
---
 contrib/credential/osxkeychain/git-credential-osxkeychain.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
index 3940202..bcd3f57 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);
 		}
-- 
1.8.3

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

* Re: [PATCH v3] credential-osxkeychain: support more protocols
  2013-05-31  4:07 [PATCH v3] credential-osxkeychain: support more protocols Xidorn Quan
@ 2013-06-02 19:46 ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2013-06-02 19:46 UTC (permalink / raw)
  To: Xidorn Quan; +Cc: git

Xidorn Quan <quanxunzhen@gmail.com> writes:

> Add protocol imap, imaps, ftp and smtp for credential-osxkeychain.
>
> Signed-off-by: Xidorn Quan <quanxunzhen@gmail.com>
> Acked-by: John Szakmeister <john@szakmeister.net>
> Acked-by: Jeff King <peff@peff.net>
> ---

Hmph, I think I already have an identical copy in my tree.  Sent a
wrong patch?

>  contrib/credential/osxkeychain/git-credential-osxkeychain.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
> index 3940202..bcd3f57 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);
>  		}

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

* [PATCH v3] credential-osxkeychain: support more protocols
  2013-05-27 14:35 [PATCH v2] " Xidorn Quan
@ 2013-05-28  2:36 ` Xidorn Quan
  0 siblings, 0 replies; 3+ messages in thread
From: Xidorn Quan @ 2013-05-28  2:36 UTC (permalink / raw)
  To: git; +Cc: Xidorn Quan, Jeff King, John Szakmeister

Add protocol imap, imaps, ftp and smtp for credential-osxkeychain.

Signed-off-by: Xidorn Quan <quanxunzhen@gmail.com>
Acked-by: John Szakmeister <john@szakmeister.net>
Acked-by: Jeff King <peff@peff.net>
---
 contrib/credential/osxkeychain/git-credential-osxkeychain.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
index 3940202..bcd3f57 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);
 		}
-- 
1.8.3

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

end of thread, other threads:[~2013-06-02 19:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-31  4:07 [PATCH v3] credential-osxkeychain: support more protocols Xidorn Quan
2013-06-02 19:46 ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2013-05-27 14:35 [PATCH v2] " Xidorn Quan
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).