Subject: Re: [PATCH 1/2] ref-filter: remove unused ref_format member

From: Junio C Hamano <[email-masked]>
Date: Thu, 30 Mar 2023 08:21:43 -0700

Øystein Walle <[email-masked]> writes:

> use_rest was added in b9dee075eb (ref-filter: add %(rest) atom,
> 2021-07-26) but was never used. As far as I can tell it was used in a
> later patch that was submitted to the mailing list but never applied.
>
> Signed-off-by: Øystein Walle <[email-masked]>
> ---
> Would be nice to have a link to the email thread here, but I don't know
> how.

Here is a link to the patch that led to that commit you cited:

https://lore.kernel.org/git/207c[email-masked]/

It indeed is cumbersome to add, as the Message-Ids for patches from
GitGitGadget tend to be ultra long.

But b9dee075eb was the last one in the 5-patch series; I do
not see any "later patch there in the thread.

>  ref-filter.h | 1 -
>  ref-filter.c | 1 -
>  2 files changed, 2 deletions(-)
>
> diff --git a/ref-filter.h b/ref-filter.h
> index aa0eea4ecf..0f4183233a 100644
> --- a/ref-filter.h
> +++ b/ref-filter.h
> @@ -75,7 +75,6 @@ struct ref_format {
>  	const char *format;
>  	const char *rest;
>  	int quote_style;
> -	int use_rest;
>  	int use_color;
>  
>  	/* Internal state to ref-filter */
> diff --git a/ref-filter.c b/ref-filter.c
> index ed802778da..20e0a72f24 100644
> --- a/ref-filter.c
> +++ b/ref-filter.c
> @@ -596,7 +596,6 @@ static int rest_atom_parser(struct ref_format *format,
>  {
>  	if (arg)
>  		return err_no_arg(err, "rest");
> -	format->use_rest = 1;
>  	return 0;
>  }