MCPcopy
hub / github.com/git-lfs/git-lfs / Locks

Method Locks

locking/cache.go:62–73  ·  view source on GitHub ↗

Get the list of cached locked files

()

Source from the content-addressed store, hash-verified

60
61// Get the list of cached locked files
62func (c *LockCache) Locks() []Lock {
63 var locks []Lock
64 c.kv.Visit(func(key string, val interface{}) bool {
65 // Only report file->id entries not reverse
66 if !c.isIdKey(key) {
67 lock := val.(*Lock)
68 locks = append(locks, *lock)
69 }
70 return true // continue
71 })
72 return locks
73}
74
75// Clear the cache
76func (c *LockCache) Clear() {

Callers 1

TestLockCacheFunction · 0.95

Calls 2

isIdKeyMethod · 0.95
VisitMethod · 0.80

Tested by 1

TestLockCacheFunction · 0.76