]> git.ipfire.org Git - thirdparty/git.git/commit - refs/refs-internal.h
ref_iterator: keep track of whether the iterator output is ordered
authorMichael Haggerty <mhagger@alum.mit.edu>
Wed, 13 Sep 2017 17:15:55 +0000 (19:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Sep 2017 06:19:07 +0000 (15:19 +0900)
commit8738a8a4df9ee50112b5f5a757c58988166974d3
tree2c7b060f1d6f7a7f0c6684c1e59e1adff9395433
parent5e00a6c873981f87165adfecf29ad0ecc2c2c5df
ref_iterator: keep track of whether the iterator output is ordered

References are iterated over in order by refname, but reflogs are not.
Some consumers of reference iteration care about the difference. Teach
each `ref_iterator` to keep track of whether its output is ordered.

`overlay_ref_iterator` is one of the picky consumers. Add a sanity
check in `overlay_ref_iterator_begin()` to verify that its inputs are
ordered.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
refs/files-backend.c
refs/iterator.c
refs/packed-backend.c
refs/ref-cache.c
refs/ref-cache.h
refs/refs-internal.h