Re: [PATCH 17/23] get_packed_ref_cache(): assume "packed-refs" won't change while locked

2017-05-18 Thread Stefan Beller
On Wed, May 17, 2017 at 6:15 PM, Jeff King wrote: > On Wed, May 17, 2017 at 10:57:34AM -0700, Stefan Beller wrote: > >> On Wed, May 17, 2017 at 5:05 AM, Michael Haggerty >> wrote: >> > If we've got the "packed-refs" file locked, then it can't change; >> > there's no need to keep calling `stat_va

Re: [PATCH 17/23] get_packed_ref_cache(): assume "packed-refs" won't change while locked

2017-05-17 Thread Jeff King
On Wed, May 17, 2017 at 10:57:34AM -0700, Stefan Beller wrote: > On Wed, May 17, 2017 at 5:05 AM, Michael Haggerty > wrote: > > If we've got the "packed-refs" file locked, then it can't change; > > there's no need to keep calling `stat_validity_check()` on it. > > This change will work in a wor

Re: [PATCH 17/23] get_packed_ref_cache(): assume "packed-refs" won't change while locked

2017-05-17 Thread Stefan Beller
On Wed, May 17, 2017 at 5:05 AM, Michael Haggerty wrote: > If we've got the "packed-refs" file locked, then it can't change; > there's no need to keep calling `stat_validity_check()` on it. This change will work in a world where all Git implementations obey a lock. If there is at least one implem

[PATCH 17/23] get_packed_ref_cache(): assume "packed-refs" won't change while locked

2017-05-17 Thread Michael Haggerty
If we've got the "packed-refs" file locked, then it can't change; there's no need to keep calling `stat_validity_check()` on it. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/refs/files-backend.c b/r