summaryrefslogtreecommitdiffstats
path: root/refs.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-02-21 13:37:35 +0100
committerJunio C Hamano <gitster@pobox.com>2024-02-21 18:58:06 +0100
commit5e01d838412d6679c40c929bbb2591669ae393d4 (patch)
treeaefb1725c0a168689d80701259f57e4e1bf4a43f /refs.c
parentrefs/files: sort merged worktree and common reflogs (diff)
downloadgit-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.c')
-rw-r--r--refs.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/refs.c b/refs.c
index fff343c256..dc25606a82 100644
--- a/refs.c
+++ b/refs.c
@@ -1594,10 +1594,6 @@ struct ref_iterator *refs_ref_iterator_begin(
if (trim)
iter = prefix_ref_iterator_begin(iter, "", trim);
- /* Sanity check for subclasses: */
- if (!iter->ordered)
- BUG("reference iterator is not ordered");
-
return iter;
}