From: Junio C Hamano <gitster@pobox.com>
To: Trieu Huynh <vikingtc4@gmail.com>
Cc: Derrick Stolee <stolee@gmail.com>, git@vger.kernel.org
Subject: Re: [GSoC PATCH] backfill: add --[no-]progress option
Date: Tue, 07 Apr 2026 12:42:44 -0700 [thread overview]
Message-ID: <xmqq5x624kwb.fsf@gitster.g> (raw)
In-Reply-To: <ktjgf2gyf5wkktiquy4cfzdcifd2yhqk3mngckaih4bwca6fda@nkcju65ku7hf> (Trieu Huynh's message of "Wed, 8 Apr 2026 02:22:33 +0700")
Trieu Huynh <vikingtc4@gmail.com> 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.
next prev parent reply other threads:[~2026-04-07 19:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-29 15:24 [GSoC PATCH] backfill: add --[no-]progress option Trieu Huynh
2026-04-06 13:16 ` Derrick Stolee
2026-04-06 17:35 ` Junio C Hamano
2026-04-07 19:22 ` Trieu Huynh
2026-04-07 19:42 ` Junio C Hamano [this message]
2026-04-07 19:15 ` Trieu Huynh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq5x624kwb.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=stolee@gmail.com \
--cc=vikingtc4@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox