git/refs
Michael Haggerty f34242975f packed_ref_iterator_begin(): make optimization more general
We can return an empty iterator not only if the `packed-refs` file is
missing, but also if it is empty or if there are no references whose
names succeed `prefix`. Optimize away those cases as well by moving
the call to `find_reference_location()` higher in the function and
checking whether the determined start position is the same as
`snapshot->eof`. (This is possible now because the previous commit
made `find_reference_location()` robust against empty snapshots.)

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-24 12:55:26 -08:00
..
files-backend.c Merge branch 'mh/avoid-rewriting-packed-refs' into maint 2017-12-06 09:08:50 -08:00
iterator.c prefix_ref_iterator: break when we leave the prefix 2017-09-14 15:19:07 +09:00
packed-backend.c packed_ref_iterator_begin(): make optimization more general 2018-01-24 12:55:26 -08:00
packed-backend.h files-backend: don't rewrite the packed-refs file unnecessarily 2017-10-30 09:45:15 +09:00
ref-cache.c ref_cache: remove support for storing peeled values 2017-09-25 18:02:46 +09:00
ref-cache.h ref_cache: remove support for storing peeled values 2017-09-25 18:02:46 +09:00
refs-internal.h Merge branch 'mh/mmap-packed-refs' 2017-10-03 15:42:50 +09:00