Re: [PATCH v3 09/10] xdiff: delete rchg aliasing
- From
Ezekiel Newren <ezekielnewren@gmail.com>
- Date
- Sep 21, 2025, 16:37 UTC
- Message-ID
- <CAH=ZcbCqnr_WteidXTETCFxO=NGuT84VRg-ZsU6Si6coP+Z2uQ@mail.gmail.com>
- In-Reply-To
- <daad78da-752b-40f4-9c69-d6f6597ca258@gmail.com>
On Sun, Sep 21, 2025 at 7:06 AM Phillip Wood <phillip.wood123@gmail.com> wrote:
> What is the purpose of this change. On the face of it it makes the code > more verbose and introduces an extra pointer dereference into the loop > condition. The compiler may lift the dereference out of the loop but it > would be helpful to know why this change is useful.
Most of Git directly accesses rchg, so changing this to also directly access it makes the code more consistent. Also, usage tracking tools like ctags or a modern IDE won't show all uses. This makes it harder to refactor or audit. Dropping the aliases means every access is visible and discoverable through the actual field name.