Thread (8 messages) flat view 8 messages, 3 authors, 1d ago

Re: [PATCH v4 0/3] refs: report old OIDs for batched deletions

From: Maciej Ciemborowicz <hidden>
Date: 2026-09-23 12:49:34

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help