aboutsummaryrefslogtreecommitdiffstats
path: root/replace-object.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-10-23 09:16:11 +0200
committerJunio C Hamano <gitster@pobox.com>2025-10-23 09:54:35 -0700
commit65dc0b3b023a18c479bafe097ced048adf20853b (patch)
treec79c6db691180cd9992d572b8ed7c524e8e15178 /replace-object.c
parentrefs: introduce wrapper struct for `each_ref_fn` (diff)
downloadgit-65dc0b3b023a18c479bafe097ced048adf20853b.tar.gz
git-65dc0b3b023a18c479bafe097ced048adf20853b.zip
refs: introduce `.ref` field for the base iterator
The base iterator has a couple of fields that tracks the name, target, object ID and flags for the current reference. Due to this design we have to create a new `struct reference` whenever we want to hand over that reference to the callback function, which is tedious and not very efficient. Convert the structure to instead contain a `struct reference` as member. This member is expected to be populated by the implementations of the iterator and is handed over to the callback directly. While at it, simplify `should_pack_ref()` to take a `struct reference` directly instead of passing its respective fields. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'replace-object.c')
0 files changed, 0 insertions, 0 deletions