diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-10-23 09:16:11 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-11-04 07:32:25 -0800 |
| commit | 89baa52da612dde6da031acfa2cb957d4297d544 (patch) | |
| tree | c79c6db691180cd9992d572b8ed7c524e8e15178 /commit-graph.c | |
| parent | bdbebe5714b25dc9d215b48efbb80f410925d7dd (diff) | |
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 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions
