aboutsummaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-03-09 14:36:55 -0700
committerJunio C Hamano <gitster@pobox.com>2026-03-09 14:36:55 -0700
commitd445aecfb013ae7b45e946f9aea06464aee69ed8 (patch)
tree14885f56e1e54ecbbf7d8350c1f5e4b753642f0d /builtin/receive-pack.c
parent5c56c725f104ce278fe1ec0ea0fce0ccfb245aea (diff)
parent1dd4f1e43f8f11ebb13c1b9edbd91219a134443d (diff)
downloadgit-d445aecfb013ae7b45e946f9aea06464aee69ed8.tar.xz
Merge branch 'ps/refs-for-each'
Code refactoring around refs-for-each-* API functions. * ps/refs-for-each: refs: replace `refs_for_each_fullref_in()` refs: replace `refs_for_each_namespaced_ref()` refs: replace `refs_for_each_glob_ref()` refs: replace `refs_for_each_glob_ref_in()` refs: replace `refs_for_each_rawref_in()` refs: replace `refs_for_each_rawref()` refs: replace `refs_for_each_ref_in()` refs: improve verification for-each-ref options refs: generalize `refs_for_each_fullref_in_prefixes()` refs: generalize `refs_for_each_namespaced_ref()` refs: speed up `refs_for_each_glob_ref_in()` refs: introduce `refs_for_each_ref_ext` refs: rename `each_ref_fn` refs: rename `do_for_each_ref_flags` refs: move `do_for_each_ref_flags` further up refs: move `refs_head_ref_namespaced()` refs: remove unused `refs_for_each_include_root_ref()`
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index f3e3cdeef6..55d39daa62 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -343,9 +343,9 @@ static void show_one_alternate_ref(const struct object_id *oid,
static void write_head_info(void)
{
+ struct refs_for_each_ref_options opts = { 0 };
static struct oidset seen = OIDSET_INIT;
struct strvec excludes_vector = STRVEC_INIT;
- const char **exclude_patterns;
/*
* We need access to the reference names both with and without their
@@ -353,12 +353,12 @@ static void write_head_info(void)
* thus have to adapt exclude patterns to carry the namespace prefix
* ourselves.
*/
- exclude_patterns = get_namespaced_exclude_patterns(
+ opts.exclude_patterns = get_namespaced_exclude_patterns(
hidden_refs_to_excludes(&hidden_refs),
get_git_namespace(), &excludes_vector);
- refs_for_each_fullref_in(get_main_ref_store(the_repository), "",
- exclude_patterns, show_ref_cb, &seen);
+ refs_for_each_ref_ext(get_main_ref_store(the_repository),
+ show_ref_cb, &seen, &opts);
odb_for_each_alternate_ref(the_repository->objects,
show_one_alternate_ref, &seen);