credential: stop using the_repository
Stop using `the_repository` in the "credential" subsystem by passing in a repository when filling, approving or rejecting credentials. Adjust callers accordingly by using `the_repository`. While there may be some callers that have a repository available in their context, this trivial conversion allows for easier verification and bubbles up the use of `the_repository` by one level. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
71e5afee8b
commit
6c27d22276
@ -942,7 +942,7 @@ static int post_rpc(struct rpc_state *rpc, int stateless_connect, int flush_rece
|
||||
do {
|
||||
err = probe_rpc(rpc, &results);
|
||||
if (err == HTTP_REAUTH)
|
||||
credential_fill(&http_auth, 0);
|
||||
credential_fill(the_repository, &http_auth, 0);
|
||||
} while (err == HTTP_REAUTH);
|
||||
if (err != HTTP_OK)
|
||||
return -1;
|
||||
@ -1064,7 +1064,7 @@ retry:
|
||||
rpc->any_written = 0;
|
||||
err = run_slot(slot, NULL);
|
||||
if (err == HTTP_REAUTH && !large_request) {
|
||||
credential_fill(&http_auth, 0);
|
||||
credential_fill(the_repository, &http_auth, 0);
|
||||
curl_slist_free_all(headers);
|
||||
goto retry;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user