Re: [PATCH 1/8] refs: remove unused typedef 'ref_transaction_commit_fn'
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Apr 22, 2026, 11:15 UTC
- Message-ID
- <aeityL_05KDRZF98@pks.im>
- In-Reply-To
- <20260420-refs-move-to-generic-layer-v1-1-513e354f376b@gmail.com>
On Mon, Apr 20, 2026 at 12:11:59PM +0200, Karthik Nayak wrote:
Show 15 quoted lines
> diff --git a/refs/refs-internal.h b/refs/refs-internal.h > index d79e35fd26..2d963cc4f4 100644 > --- a/refs/refs-internal.h > +++ b/refs/refs-internal.h > @@ -421,10 +421,6 @@ typedef int ref_transaction_abort_fn(struct ref_store *refs, > struct ref_transaction *transaction, > struct strbuf *err); > > -typedef int ref_transaction_commit_fn(struct ref_store *refs, > - struct ref_transaction *transaction, > - struct strbuf *err); > - > typedef int optimize_fn(struct ref_store *ref_store, > struct refs_optimize_opts *opts); >
I'm in general not much of a fan of these typedefs -- there's not really much of a point why we'd need them in the first place. We don't use them as a type anywhere but in the struct definition for the ref backend. So we could just as well move them in there, which would also ensure that they cannot become stale in the first place.
Patrick