aboutsummaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-02-23 12:59:50 +0100
committerJunio C Hamano <gitster@pobox.com>2026-02-23 13:21:19 -0800
commit96c35a9ba5f1b5afac1e30ca93815dcd540d8b16 (patch)
tree430eccac9fc2a8558e15f4ad56c788273c6f099b /upload-pack.c
parent3fc1ad03c6243b44c2dcab480acaced44921b1c5 (diff)
downloadgit-96c35a9ba5f1b5afac1e30ca93815dcd540d8b16.tar.xz
refs: replace `refs_for_each_namespaced_ref()`
Replace calls to `refs_for_each_namespaced_ref()` 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 'upload-pack.c')
-rw-r--r--upload-pack.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 7fe397b0d0..d21f0577f9 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -610,7 +610,10 @@ static int allow_hidden_refs(enum allow_uor allow_uor)
static void for_each_namespaced_ref_1(refs_for_each_cb fn,
struct upload_pack_data *data)
{
- const char **excludes = NULL;
+ struct refs_for_each_ref_options opts = {
+ .namespace = get_git_namespace(),
+ };
+
/*
* If `data->allow_uor` allows fetching hidden refs, we need to
* mark all references (including hidden ones), to check in
@@ -621,10 +624,10 @@ static void for_each_namespaced_ref_1(refs_for_each_cb fn,
* hidden references.
*/
if (allow_hidden_refs(data->allow_uor))
- excludes = hidden_refs_to_excludes(&data->hidden_refs);
+ opts.exclude_patterns = hidden_refs_to_excludes(&data->hidden_refs);
- refs_for_each_namespaced_ref(get_main_ref_store(the_repository),
- excludes, fn, data);
+ refs_for_each_ref_ext(get_main_ref_store(the_repository),
+ fn, data, &opts);
}