clear_packed_ref_cache(): don't protest if the lock is held

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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Michael Haggerty 2017-06-23 09:01:44 +02:00 committed by Junio C Hamano
parent 49aebcf432
commit 9051198214
1 changed files with 0 additions and 2 deletions

View File

@ -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);
}