Re: [PATCH v5 1/3] refs: allow callers to supply old OIDs for batch deletion
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Sep 28, 2026, 06:44 UTC
- Message-ID
- <aroMsk9VdUm8u8nb@pks.im>
- In-Reply-To
- <CACQ=SRGA5j9ChJ0uM4=5iCwEDgWQEdhhrD8OF9=RJ7XBxqb0dQ@mail.gmail.com>
On Thu, Sep 24, 2026 at 10:13:33PM +0200, Maciej Ciemborowicz wrote:
Show 12 quoted lines
> On Thu, Sep 24, 2026 at 6:45 PM Junio C Hamano <gitster@pobox.com> wrote: > > > "callers cannot preserve", meaning "after deletion the values cannot > > be read anymore"? Of course, but then callers can read them > > beforehand and use the stored value when calling hooks later. > > I meant that refs_delete_refs() has no parameter for > the values its callers have already resolved, so those values are not > carried into the transaction and are therefore not available to the hook. > > Patrick's later suggestion to resolve missing old values in the common hook > layer seems to avoid this API question altogether.
Yup, exactly. All users of reference transactions would always supply both old and new object ID to the reftx hook without changes to any of the callers. And I think that's a sensible change to make.
Patrick