Re: [PATCH 5/5] refs: remove functions without ref store

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <ps@xxxxxx>
> ---
>  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





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux