]> git.ipfire.org Git - thirdparty/git.git/commit
refs: drop `current_ref_iter` hack
authorPatrick Steinhardt <ps@pks.im>
Thu, 23 Oct 2025 07:16:18 +0000 (09:16 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 4 Nov 2025 15:32:25 +0000 (07:32 -0800)
commit5a5c7359f77ecd1bc4b0e172563161d602f131d3
tree74ffff6a18cfd7cea56dbe323f965349ed2bd481
parentfeaaea4c123e6b94ebbdc2135278946ee9cc8eed
refs: drop `current_ref_iter` hack

In preceding commits we have refactored all callers of
`peel_iterated_oid()` to instead use `reference_get_peeled_oid()`. This
allows us to thus get rid of the former function.

Getting rid of that function is nice, but even nicer is that this also
allows us to get rid of the `current_ref_iter` hack. This global
variable tracked the currently-active ref iterator so that we can use it
to peel an object ID. Now that the peeled object ID is propagated via
`struct reference` though we don't have to depend on this hack anymore,
which makes for a more robust and easier-to-understand infrastructure.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
refs/iterator.c
refs/refs-internal.h