Re: [PATCH v2 14/21] read_packed_refs(): ensure that references are ordered when read

2017-09-25 Thread Johannes Schindelin
Hi Michael, On Thu, 21 Sep 2017, Michael Haggerty wrote: > On 09/20/2017 08:50 PM, Jeff King wrote: > > On Tue, Sep 19, 2017 at 08:22:22AM +0200, Michael Haggerty wrote: > >> If `packed-refs` was already sorted, then (if the system allows it) > >> we can use the mmapped file contents directly. Bu

Re: [PATCH v2 14/21] read_packed_refs(): ensure that references are ordered when read

2017-09-21 Thread Michael Haggerty
On 09/20/2017 08:50 PM, Jeff King wrote: > On Tue, Sep 19, 2017 at 08:22:22AM +0200, Michael Haggerty wrote: >> If `packed-refs` was already sorted, then (if the system allows it) we >> can use the mmapped file contents directly. But if the system doesn't >> allow a file that is currently mmapped t

Re: [PATCH v2 14/21] read_packed_refs(): ensure that references are ordered when read

2017-09-20 Thread Jeff King
On Tue, Sep 19, 2017 at 08:22:22AM +0200, Michael Haggerty wrote: > If `packed-refs` was already sorted, then (if the system allows it) we > can use the mmapped file contents directly. But if the system doesn't > allow a file that is currently mmapped to be replaced using > `rename()`, then it wou

[PATCH v2 14/21] read_packed_refs(): ensure that references are ordered when read

2017-09-18 Thread Michael Haggerty
It doesn't actually matter now, because the references are only iterated over to fill the associated `ref_cache`, which itself puts them in the correct order. But we want to get rid of the `ref_cache`, so we want to be able to iterate directly over the `packed-refs` buffer, and then the iteration w