diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2017-09-13 19:15:55 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-14 15:19:07 +0900 |
commit | 8738a8a4df9ee50112b5f5a757c58988166974d3 (patch) | |
tree | 2c7b060f1d6f7a7f0c6684c1e59e1adff9395433 /refs/packed-backend.c | |
parent | files_transaction_finish(): delete reflogs before references (diff) | |
download | tgif-8738a8a4df9ee50112b5f5a757c58988166974d3.tar.xz |
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>
Diffstat (limited to 'refs/packed-backend.c')
-rw-r--r-- | refs/packed-backend.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/refs/packed-backend.c b/refs/packed-backend.c index 0279aeceea..e411501871 100644 --- a/refs/packed-backend.c +++ b/refs/packed-backend.c @@ -437,7 +437,7 @@ static struct ref_iterator *packed_ref_iterator_begin( iter = xcalloc(1, sizeof(*iter)); ref_iterator = &iter->base; - base_ref_iterator_init(ref_iterator, &packed_ref_iterator_vtable); + base_ref_iterator_init(ref_iterator, &packed_ref_iterator_vtable, 1); /* * Note that get_packed_ref_cache() internally checks whether |