Commit 7f2c1469f8565fa8809c03aa7aa0ffae90a99c66

Edward Thomson 2015-12-14T13:54:02

Merge pull request #3528 from chescock/Passthrough-from-credential-callback Treat GIT_PASSTHROUGH as though git_cred_acquire_cb isn't set.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/transports/winhttp.c b/src/transports/winhttp.c
index 77d939b..9e97a27 100644
--- a/src/transports/winhttp.c
+++ b/src/transports/winhttp.c
@@ -930,7 +930,10 @@ replay:
 					cred_error = t->owner->cred_acquire_cb(&t->cred, t->owner->url,
 						t->connection_data.user, allowed_types,	t->owner->cred_acquire_payload);
 
-					if (cred_error < 0)
+					/* Treat GIT_PASSTHROUGH as though git_cred_acquire_cb isn't set */
+					if (cred_error == GIT_PASSTHROUGH)
+						cred_error = 1;
+					else if (cred_error < 0)
 						return cred_error;
 				}