Re: [PATCH v4 0/3] refs: report old OIDs for batched deletions
- From
Maciej Ciemborowicz <maciej.ciemborowicz@gmail.com>
- Date
- Sep 23, 2026, 12:49 UTC
- Message-ID
- <20260923124931.39424-1-maciej.ciemborowicz@gmail.com>
- In-Reply-To
- <CAOLa=ZTN1TU2A1sgEhiw=ymMYr6Ge11cMEubSaeKqr4WNU=2EQ@mail.gmail.com>
Hi Junio,
> Can we avoid REF_TRANSACTION_FLAG_SKIP_HOOK by changing the call chain > instead of exposing a general mechanism for skipping hooks?
I looked into that, but I do not think it removes the distinction cleanly. The packed-refs transaction is an internal, physical part of one logical files-backend update: it needs the normal transaction machinery, while the reference-transaction hook must observe only the outer logical update.
Restructuring the call chain would either duplicate the prepare/finish/abort lifecycle or hide the same hook-suppression decision in a less explicit helper. I do agree that this should not be a public escape hatch, though. I will keep it internal to the refs implementation and limit its use to these internal transactions.
> Should the int copy parameter simply be bool copy, given that the > function has only two modes?
Yes, agreed. It is a two-state mode, so bool copy expresses the contract more clearly. I will change it in the next reroll.
Thanks, Maciej