diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-02-23 12:59:48 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-23 13:21:19 -0800 |
| commit | 4091d2989353aaf14080ee64ee2e94b60ceaf18d (patch) | |
| tree | 978744ce88f964d301279f07552e28de8cf35724 /builtin/rev-parse.c | |
| parent | 5ef6d593f18ac6b1e7540eed45f5d795d5a82faa (diff) | |
| download | git-4091d2989353aaf14080ee64ee2e94b60ceaf18d.tar.xz | |
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 <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rev-parse.c')
| -rw-r--r-- | builtin/rev-parse.c | 10 |
1 files changed, 7 insertions, 3 deletions
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, |
