Subject: Re: [PATCH 1/8] refs: remove unused typedef 'ref_transaction_commit_fn'

From: Patrick Steinhardt <[email-masked]>
Date: Wed, 22 Apr 2026 13:15:20 +0200

On Mon, Apr 20, 2026 at 12:11:59PM +0200, Karthik Nayak wrote:
> 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