From: Patrick Steinhardt Date: Mon, 28 Sep 2026 06:44:02 GMT Subject: Re: [PATCH v5 1/3] refs: allow callers to supply old OIDs for batch deletion Message-ID: In-Reply-To: On Thu, Sep 24, 2026 at 10:13:33PM +0200, Maciej Ciemborowicz wrote: > On Thu, Sep 24, 2026 at 6:45 PM Junio C Hamano 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