git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/5] refs: add `exclude_patterns` parameter to `for_each_fullref_in()`
Date: Fri, 3 May 2024 14:44:41 -0400	[thread overview]
Message-ID: <ZjUwmeghHMH254w0@nand.local> (raw)
In-Reply-To: <4f34bb2e03479b4987ef30330f096650de354b06.1714717057.git.ps@pks.im>

On Fri, May 03, 2024 at 08:28:04AM +0200, Patrick Steinhardt wrote:
> The `for_each_fullref_in()` function is supposedly the ref-store-less
> equivalent of `refs_for_each_fullref_in()`, but the latter has gained a
> new parameter `exclude_patterns` over time. Bring these two functions
> back in sync again by adding the parameter to the former function, as
> well.

Much appreciated. I think that this one is my doing from b269ac53c07
(refs: plumb `exclude_patterns` argument throughout, 2023-07-10), which
only touched refs_for_each_fullref_in(), not for_each_fullref_in().

Thanks for bringing the two into line with one another.

> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  builtin/rev-parse.c |  4 ++--
>  builtin/show-ref.c  |  4 ++--
>  ref-filter.c        | 10 +++++-----
>  refs.c              |  8 +++++---
>  refs.h              |  3 ++-
>  5 files changed, 16 insertions(+), 13 deletions(-)
>
> diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
> index 624182e507..2b28d43939 100644
> --- a/builtin/rev-parse.c
> +++ b/builtin/rev-parse.c
> @@ -908,8 +908,8 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
>  				continue;
>  			}
>  			if (!strcmp(arg, "--bisect")) {
> -				for_each_fullref_in("refs/bisect/bad", show_reference, NULL);
> -				for_each_fullref_in("refs/bisect/good", anti_reference, NULL);
> +				for_each_fullref_in("refs/bisect/bad", NULL, show_reference, NULL);
> +				for_each_fullref_in("refs/bisect/good", NULL, anti_reference, NULL);
>  				continue;
>  			}
>  			if (opt_with_value(arg, "--branches", &arg)) {

Here and below, passing NULL for 'exclude_patterns' is expected, since
we have no such patterns in the first place.

Looking good.

Thanks,
Taylor

  reply	other threads:[~2024-05-03 18:44 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03  6:27 [PATCH 0/5] refs: remove functions without ref store Patrick Steinhardt
2024-05-03  6:27 ` [PATCH 1/5] refs: introduce missing functions that accept a `struct ref_store` Patrick Steinhardt
2024-05-03 17:11   ` Junio C Hamano
2024-05-03  6:28 ` [PATCH 2/5] refs: add `exclude_patterns` parameter to `for_each_fullref_in()` Patrick Steinhardt
2024-05-03 18:44   ` Taylor Blau [this message]
2024-05-03  6:28 ` [PATCH 3/5] cocci: introduce rules to transform "refs" to pass ref store Patrick Steinhardt
2024-05-03  6:28 ` [PATCH 4/5] cocci: apply rules to rewrite callers of "refs" interfaces Patrick Steinhardt
2024-05-03 18:48   ` Taylor Blau
2024-05-03 19:20     ` Junio C Hamano
2024-05-06  6:35       ` Patrick Steinhardt
2024-05-03  6:28 ` [PATCH 5/5] refs: remove functions without ref store Patrick Steinhardt
2024-05-06  1:15   ` James Liu
2024-05-03 17:24 ` [PATCH 0/5] " Junio C Hamano
2024-05-03 17:35   ` Jeff King
2024-05-03 18:24     ` Junio C Hamano
2024-05-06  6:44       ` Patrick Steinhardt
2024-05-06 16:14         ` Junio C Hamano
2024-05-07  5:56           ` Patrick Steinhardt
2024-05-07  6:20             ` Junio C Hamano
2024-05-07  6:30               ` Patrick Steinhardt
2024-05-07 15:46                 ` Junio C Hamano
2024-05-09 16:55         ` Jeff King
2024-05-10  5:54           ` Patrick Steinhardt
2024-05-03 18:58     ` Taylor Blau
2024-05-03 19:35       ` Junio C Hamano
2024-05-07  7:11 ` [PATCH v2 " Patrick Steinhardt
2024-05-07  7:11   ` [PATCH v2 1/5] refs: introduce missing functions that accept a `struct ref_store` Patrick Steinhardt
2024-05-07  7:11   ` [PATCH v2 2/5] refs: add `exclude_patterns` parameter to `for_each_fullref_in()` Patrick Steinhardt
2024-05-07  7:11   ` [PATCH v2 3/5] cocci: introduce rules to transform "refs" to pass ref store Patrick Steinhardt
2024-05-07  7:11   ` [PATCH v2 4/5] cocci: apply rules to rewrite callers of "refs" interfaces Patrick Steinhardt
2024-05-07  7:11   ` [PATCH v2 5/5] refs: remove functions without ref store Patrick Steinhardt
2024-05-07 17:27   ` [PATCH v2 0/5] " Taylor Blau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZjUwmeghHMH254w0@nand.local \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).