Re: [PATCH v2 25/25] cache_ref_iterator_begin(): avoid priming unneeded directories

2017-05-24 Thread Junio C Hamano
Michael Haggerty writes: > Junio, if a reroll is not needed for other reasons, would you mind > squashing this into the last patch of my series? Will do, but won't happen until morning in Tokyo. I've just finished today's integration cycle. Thanks.

Re: [PATCH v2 25/25] cache_ref_iterator_begin(): avoid priming unneeded directories

2017-05-24 Thread Michael Haggerty
On 05/23/2017 09:45 PM, Jeff King wrote: > On Mon, May 22, 2017 at 04:17:55PM +0200, Michael Haggerty wrote: > >> So: >> >> * Move the responsibility for doing the prefix check directly to >> `cache_ref_iterator`. This means that `cache_ref_iterator_begin()` >> never has to wrap its return

Re: [PATCH v2 25/25] cache_ref_iterator_begin(): avoid priming unneeded directories

2017-05-23 Thread Jeff King
On Mon, May 22, 2017 at 04:17:55PM +0200, Michael Haggerty wrote: > So: > > * Move the responsibility for doing the prefix check directly to > `cache_ref_iterator`. This means that `cache_ref_iterator_begin()` > never has to wrap its return value in a `prefix_ref_iterator`. > > * Teach

[PATCH v2 25/25] cache_ref_iterator_begin(): avoid priming unneeded directories

2017-05-22 Thread Michael Haggerty
When iterating over references, reference priming is used to make sure that loose references are read into the ref-cache before packed references, to avoid races. It used to be that the prefix passed to reference iterators almost always ended in `/`, for example `refs/heads/`. In that case, the