Skip to content

Commit 9051198

Browse files
mhaggergitster
authored andcommitted
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>
1 parent 49aebcf commit 9051198

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

refs/packed-backend.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ static void clear_packed_ref_cache(struct packed_ref_store *refs)
133133
if (refs->cache) {
134134
struct packed_ref_cache *cache = refs->cache;
135135

136-
if (is_lock_file_locked(&refs->lock))
137-
die("BUG: packed-ref cache cleared while locked");
138136
refs->cache = NULL;
139137
release_packed_ref_cache(cache);
140138
}

0 commit comments

Comments
 (0)