From 4091d2989353aaf14080ee64ee2e94b60ceaf18d Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Mon, 23 Feb 2026 12:59:48 +0100 Subject: refs: replace `refs_for_each_glob_ref_in()` Replace calls to `refs_for_each_glob_ref_in()` with the newly introduced `refs_for_each_ref_ext()` function. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- builtin/rev-parse.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'builtin/rev-parse.c') diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index 02703f2fb8..61a3f0fdb9 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -614,9 +614,13 @@ static int opt_with_value(const char *arg, const char *opt, const char **value) static void handle_ref_opt(const char *pattern, const char *prefix) { if (pattern) { - refs_for_each_glob_ref_in(get_main_ref_store(the_repository), - show_reference, pattern, prefix, - NULL); + struct refs_for_each_ref_options opts = { + .pattern = pattern, + .prefix = prefix, + .trim_prefix = prefix ? strlen(prefix) : 0, + }; + refs_for_each_ref_ext(get_main_ref_store(the_repository), + show_reference, NULL, &opts); } else { struct refs_for_each_ref_options opts = { .prefix = prefix, -- cgit v1.3