Subject: Re: [PATCH 2/2] read-cache: fix incorrect count and progress bar stalling

From: Junio C Hamano <[email-masked]>
Date: Tue, 08 Jun 2021 08:41:19 +0900

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

>> So I think this pattern works:
>>
>> 	for (i = 0; i < nr; i++) {
>> 		display_progress(p, i);
>> 		/* work work work */
>> 	}
>> 	display_progress(p, nr);
>>
>> Alternatively, if the work part doesn't contain continue statements:
>>
>> 	for (i = 0; i < nr; i++) {
>> 		/* work work work */
>> 		display_progress(p, i + 1);
>> 	}
>
> But yes, I agree with the issue in theory, but I think in practice we
> don't need to worry about these 100% cases.

Hmph, but in practice we do need to worry, don't we?  Otherwise you
wouldn't have started this thread and René wouldn't have responded.

I agree with the issue and I think we should count what we have
finished.