Skip to content

Commit 7f2c146

Browse files
committed
Merge pull request libgit2#3528 from chescock/Passthrough-from-credential-callback
Treat GIT_PASSTHROUGH as though git_cred_acquire_cb isn't set.
2 parents 30c8e26 + efd9ab5 commit 7f2c146

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/transports/winhttp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,10 @@ static int winhttp_stream_read(
930930
cred_error = t->owner->cred_acquire_cb(&t->cred, t->owner->url,
931931
t->connection_data.user, allowed_types, t->owner->cred_acquire_payload);
932932

933-
if (cred_error < 0)
933+
/* Treat GIT_PASSTHROUGH as though git_cred_acquire_cb isn't set */
934+
if (cred_error == GIT_PASSTHROUGH)
935+
cred_error = 1;
936+
else if (cred_error < 0)
934937
return cred_error;
935938
}
936939

0 commit comments

Comments
 (0)