From: Karthik Nayak Date: Wed, 22 Apr 2026 13:14:44 GMT Subject: Re: [PATCH 3/8] refs: return `ref_transaction_error` from `ref_transaction_update()` Message-ID: In-Reply-To: Patrick Steinhardt writes: > On Mon, Apr 20, 2026 at 12:12:01PM +0200, Karthik Nayak wrote: >> 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 more beneficial if the > > s/more beneficial/beneficial/ > Will do. >> 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'. 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. > > Yup, makes sense. This doesn't buy us anything yet, but will eventually. > > Patrick Exactly!