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.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.c')
-rw-r--r-- | refs.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -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; } |