Subject: Re: [GSoC PATCH] backfill: add --[no-]progress option

From: Junio C Hamano <[email-masked]>
Date: Tue, 07 Apr 2026 12:42:44 -0700

Trieu Huynh <[email-masked]> writes:

>> >> +	display_progress(ctx->progress, ++ctx->batches_requested);
>> >
>> > This looks correct. My preference is to not use prefix operators
>> > like this on struct members (it reads like you are incrementing
>> > 'ctx' and not 'batches_requested', even though it is correct).
>> 
>> Thanks for paying extra attention to such details.  In general,
>> post-increment and pre-decrement are the norm when evaluated in a
>> void context, so the use of pre-increment above violates that norm
>> too.
>> 
> Thanks for pointing it out. Will update, eg:
> ++counter;
> foo(counter);

I think you meant "counter++; foo(counter);" instead.  Otherwise,
the first line is exactly a pre-increment in a void context.