[PATCH 25/28] clear_packed_ref_cache(): don't protest if the lock is held
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- Jun 15, 2017, 14:47 UTC
- Message-ID
- <3be564c3f49454cc0ea48bf5ebb70a34e17bd41d.1497534157.git.mhagger@alum.mit.edu>
- In-Reply-To
- <cover.1497534157.git.mhagger@alum.mit.edu>
The existing callers already check that the lock isn't held just before calling `clear_packed_ref_cache()`, and in the near future we want to be able to call this function when the lock is held.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> --- refs/packed-backend.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/refs/packed-backend.c b/refs/packed-backend.c index ff6326ddb8..1732e3aad4 100644 --- a/refs/packed-backend.c +++ b/refs/packed-backend.c @@ -133,8 +133,6 @@ static void clear_packed_ref_cache(struct packed_ref_store *refs) if (refs->cache) { struct packed_ref_cache *cache = refs->cache; - if (is_lock_file_locked(&refs->lock)) - die("BUG: packed-ref cache cleared while locked"); refs->cache = NULL; release_packed_ref_cache(cache); }
-- 2.11.0