Re: [PATCH 02/16] refs: add methods for misc ref operations
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 11, 2015, 23:39 UTC
- Message-ID
- <xmqqmvtgd06p.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1449102921-7707-3-git-send-email-dturner@twopensource.com>
David Turner <dturner@twopensource.com> writes:
Show 13 quoted lines
> struct ref_be {
> struct ref_be *next;
> const char *name;
> ref_transaction_commit_fn *transaction_commit;
> +
> + pack_refs_fn *pack_refs;
> + peel_ref_fn *peel_ref;
> + create_symref_fn *create_symref;
> +
> + resolve_ref_unsafe_fn *resolve_ref_unsafe;
> + verify_refname_available_fn *verify_refname_available;
> + resolve_gitlink_ref_fn *resolve_gitlink_ref;
> };This may have been pointed out in the previous reviews by somebody else, but I think it is more customary to declare a struct member that is a pointer to a customization function without leading '*', i.e.
typedef TYPE (*customize_fn)(ARGS);
struct vtable {
...
cutomize_fn fn;
...
};in our codebase (cf. string_list::cmp, prio_queue::compare).