aboutsummaryrefslogtreecommitdiff
path: root/builtin/rev-parse.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-02-23 12:59:51 +0100
committerJunio C Hamano <gitster@pobox.com>2026-02-23 13:21:19 -0800
commit1dd4f1e43f8f11ebb13c1b9edbd91219a134443d (patch)
tree710bfca410849ab8e8894fb38977c13013438127 /builtin/rev-parse.c
parent96c35a9ba5f1b5afac1e30ca93815dcd540d8b16 (diff)
downloadgit-1dd4f1e43f8f11ebb13c1b9edbd91219a134443d.tar.xz
refs: replace `refs_for_each_fullref_in()`
Replace calls to `refs_for_each_fullref_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.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 61a3f0fdb9..01a62800e8 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -940,14 +940,13 @@ int cmd_rev_parse(int argc,
continue;
}
if (!strcmp(arg, "--bisect")) {
- refs_for_each_fullref_in(get_main_ref_store(the_repository),
- "refs/bisect/bad",
- NULL, show_reference,
- NULL);
- refs_for_each_fullref_in(get_main_ref_store(the_repository),
- "refs/bisect/good",
- NULL, anti_reference,
- NULL);
+ struct refs_for_each_ref_options opts = { 0 };
+ opts.prefix = "refs/bisect/bad";
+ refs_for_each_ref_ext(get_main_ref_store(the_repository),
+ show_reference, NULL, &opts);
+ opts.prefix = "refs/bisect/good";
+ refs_for_each_ref_ext(get_main_ref_store(the_repository),
+ anti_reference, NULL, &opts);
continue;
}
if (opt_with_value(arg, "--branches", &arg)) {