Subject: Re: [PATCH 3/3] http: automatically retry some requests

From: Junio C Hamano <[email-masked]>
Date: Tue, 13 Oct 2020 10:45:01 -0700

Sean McAllister <[email-masked]> writes:

>> > +static int http_retry_limit = 3;
>> > +static int http_default_delay = 2;
>>
>> Should there be a config option for that? Also, it took me some time to
>> find the code using this variable in order to find out what unit to use:
>> it is seconds (not microseconds, as I had expected). Maybe this can be
>> documented in the variable name, or at least in a comment?
>
> Junio tossed that out during our private review and I think we decided to just

Needs clarification.  Here "that" in "tossed that out" only refers
to "static int const http_retry_limit = 3" and friends and nothing
else.  There weren't any discussion on units or comments.  I did
mention that it is an obvious future possibility to make these
configurable and that was why I suggested to "toss out" the const.

It seems we'll see names with "seconds" in them somewhere, which is
good.

> I've been writing a lot of python code lately =D  So splitting into
> lines was a natural paradigm for me.  You're right, I like yours more.  I've
> refactored it to be closer to that.  Little bit of fiddling to deal with header
> whitespace properly, but it's pretty close.

Good.  I personally think strbuf_split() is a mistaken API whose use
needs to be killed, so it makes me happy to see one new callsite we
didn't have to add ;-)

Thanks.