From: Junio C Hamano Date: Mon, 05 Oct 2015 17:25:11 GMT Subject: Re: [PATCH v2 18/43] refs-be-files.c: add a backend method structure with transaction functions Message-ID: In-Reply-To: <56122EB6.2020501@alum.mit.edu> Michael Haggerty writes: >> +/* refs backends */ >> +typedef struct ref_transaction *(*ref_transaction_begin_fn)(struct strbuf *err); > > Hmmm, I thought our convention was to define typedefs for functions > themselves, not for the pointer-to-function; e.g., > > typedef struct ref_transaction *ref_transaction_begin_fn(struct > strbuf *err); > > (which would require `struct ref_be` to be changed to > > ref_transaction_begin_fn *transaction_begin; > > etc.) But now as I grep through the code it looks like both conventions > are used. So never mind :-) Well spotted. My recollection is the same and we do prefer the latter (I think all early function typedefs by Linus were done that way). It would be better to correct existing mistakes we added over time and certainly not add more of them in new code. Thanks.