diff options
author | Jeff King <peff@peff.net> | 2012-10-12 03:35:33 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-10-12 09:45:13 -0700 |
commit | abf8df869c79ee6fa021b117e60683fe149131d8 (patch) | |
tree | 0cee9e62eeb7312f08d4d52cf03a7c6440418630 /t/t4035-diff-quiet.sh | |
parent | http: fix segfault in handle_curl_result (diff) | |
download | tgif-abf8df869c79ee6fa021b117e60683fe149131d8.tar.xz |
remote-curl: do not call run_slot repeatedly
Commit b81401c (http: prompt for credentials on failed POST)
taught post_rpc to call run_slot in a loop in order to retry
a request after asking the user for credentials. However,
after a call to run_slot we will have called
finish_active_slot. This means we have released the slot,
and we should no longer look at it.
As it happens, this does not cause any bugs in the current
code, since we know that we are not using curl_multi in this
code path, and therefore nobody will have taken over our
slot in the meantime. However, it is good form to actually
call get_active_slot again. It also future proofs us against
changes in the http code.
We can do this by jumping back to a retry label at the top
of our function. We just need to reorder a few setup lines
that should not be repeated; everything else within the loop
is either idempotent, needs to be repeated, or in a path we
do not follow (e.g., we do not even try when large_request
is set, because we don't know how much data we might have
streamed from our helper program).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4035-diff-quiet.sh')
0 files changed, 0 insertions, 0 deletions