From: James Liu Date: Mon, 06 May 2024 01:15:58 GMT Subject: Re: [PATCH 5/5] refs: remove functions without ref store Message-ID: In-Reply-To: <47eb6aee922b1e17caa76b2e7366d9bdf26aa6e1.1714717057.git.ps@pks.im> On Fri May 3, 2024 at 4:28 PM AEST, Patrick Steinhardt wrote: > The preceding commit has rewritten all callers of ref-related functions > to use the equivalents that accept a `struct ref_store`. Consequently, > the respective variants without the ref store are now unused. Remove > them. > > Signed-off-by: Patrick Steinhardt > --- > refs.c | 198 --------------------------------------------------------- > refs.h | 72 +-------------------- > 2 files changed, 2 insertions(+), 268 deletions(-) This is very cool, Coccinelle is a TIL for me. > @@ -560,17 +519,7 @@ int refs_for_each_reflog_ent_reverse(struct ref_store *refs, > void *cb_data); > > /* > - * Iterate over reflog entries in the log for `refname` in the main ref store. > - */ > - > -/* oldest entry first */ > -int for_each_reflog_ent(const char *refname, each_reflog_ent_fn fn, void *cb_data); > - > -/* youngest entry first */ > -int for_each_reflog_ent_reverse(const char *refname, each_reflog_ent_fn fn, void *cb_data); > - > -/* > - * The signature for the callback function for the {refs_,}for_each_reflog() > + * The signature for the callback function for the refs_for_each_reflog() > * functions below. The memory pointed to by the refname argument is only > * guaranteed to be valid for the duration of a single callback invocation. > */ `s/functions below/function below` since the non-namespaced variant has now been removed. Cheers, James