diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-02-21 13:37:35 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-02-21 18:58:06 +0100 |
commit | 5e01d838412d6679c40c929bbb2591669ae393d4 (patch) | |
tree | aefb1725c0a168689d80701259f57e4e1bf4a43f /refs/ref-cache.c | |
parent | refs/files: sort merged worktree and common reflogs (diff) | |
download | git-5e01d838412d6679c40c929bbb2591669ae393d4.tar.xz git-5e01d838412d6679c40c929bbb2591669ae393d4.zip |
refs: always treat iterators as ordered
In the preceding commit we have converted the reflog iterator of the
"files" backend to be ordered, which was the only remaining ref iterator
that wasn't ordered. Refactor the ref iterator infrastructure so that we
always assume iterators to be ordered, thus simplifying the code.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/ref-cache.c')
-rw-r--r-- | refs/ref-cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/refs/ref-cache.c b/refs/ref-cache.c index a372a00941..9f9797209a 100644 --- a/refs/ref-cache.c +++ b/refs/ref-cache.c @@ -486,7 +486,7 @@ struct ref_iterator *cache_ref_iterator_begin(struct ref_cache *cache, CALLOC_ARRAY(iter, 1); ref_iterator = &iter->base; - base_ref_iterator_init(ref_iterator, &cache_ref_iterator_vtable, 1); + base_ref_iterator_init(ref_iterator, &cache_ref_iterator_vtable); ALLOC_GROW(iter->levels, 10, iter->levels_alloc); iter->levels_nr = 1; |