From: Toon Claes Date: Fri, 24 Apr 2026 11:01:25 GMT Subject: Re: [PATCH v2 4/9] refs: return `ref_transaction_error` from `ref_transaction_update()` Message-ID: <875x5gei62.fsf@toon--20250203-5JQV3.mail-host-address-is-not-set> In-Reply-To: <20260423-refs-move-to-generic-layer-v2-4-ae5a4f146d7d@gmail.com> Karthik Nayak writes: > The `ref_transaction_update()` function is used to add updates to a > given reference transactions. In the following commit, we'll add more > validation to this function. As such, it would be beneficial if the > function returns specific error types, so callers can differentiate > between different errors. > > To facilitate this, return `enum ref_transaction_error` from the > function and covert the existing '-1' returns to > 'REF_TRANSACTION_ERROR_GENERIC'. I had to look it up, but it seems this enum was introduced not long ago in 76e760b999 (refs: introduce enum-based transaction error types, 2025-04-08). I'm happy to see it's reused here. > Since this retains the existing > behavior, no changes are made to any of the callers but this sets the > necessary infrastructure for introduction of other errors. Makes sense. -- Toon