aboutsummaryrefslogtreecommitdiffstats
path: root/refs/debug.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-10-23 09:16:19 +0200
committerJunio C Hamano <gitster@pobox.com>2025-11-04 07:32:25 -0800
commit705114772e0a0741c3288329bd9ac4e11e38db9a (patch)
treec357e79eee935ab33e47f91f20e631227b436827 /refs/debug.c
parentrefs: drop `current_ref_iter` hack (diff)
downloadgit-705114772e0a0741c3288329bd9ac4e11e38db9a.tar.gz
git-705114772e0a0741c3288329bd9ac4e11e38db9a.zip
refs: drop infrastructure to peel via iterators
Now that the peeled object ID gets propagated via the `struct reference` there is no need anymore to call into the reference iterator itself to dereference an object. Remove this infrastructure. Most of the changes are straight-forward deletions of code. There is one exception though in `refs/packed-backend.c::write_with_updates()`. Here we stop peeling the iterator and instead just pass the peeled object ID of that iterator directly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/debug.c')
-rw-r--r--refs/debug.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/refs/debug.c b/refs/debug.c
index 67718bd1f4..01499b9033 100644
--- a/refs/debug.c
+++ b/refs/debug.c
@@ -177,16 +177,6 @@ static int debug_ref_iterator_seek(struct ref_iterator *ref_iterator,
return res;
}
-static int debug_ref_iterator_peel(struct ref_iterator *ref_iterator,
- struct object_id *peeled)
-{
- struct debug_ref_iterator *diter =
- (struct debug_ref_iterator *)ref_iterator;
- int res = diter->iter->vtable->peel(diter->iter, peeled);
- trace_printf_key(&trace_refs, "iterator_peel: %s: %d\n", diter->iter->ref.name, res);
- return res;
-}
-
static void debug_ref_iterator_release(struct ref_iterator *ref_iterator)
{
struct debug_ref_iterator *diter =
@@ -198,7 +188,6 @@ static void debug_ref_iterator_release(struct ref_iterator *ref_iterator)
static struct ref_iterator_vtable debug_ref_iterator_vtable = {
.advance = debug_ref_iterator_advance,
.seek = debug_ref_iterator_seek,
- .peel = debug_ref_iterator_peel,
.release = debug_ref_iterator_release,
};