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

Method RemoveByPath

locking/cache.go:39–47  ·  view source on GitHub ↗

Remove a cached lock by path because it's been relinquished

(filePath string)

Source from the content-addressed store, hash-verified

37
38// Remove a cached lock by path because it's been relinquished
39func (c *LockCache) RemoveByPath(filePath string) error {
40 ilock := c.kv.Get(filePath)
41 if lock, ok := ilock.(*Lock); ok && lock != nil {
42 c.kv.Remove(lock.Path)
43 // Id as key is encoded
44 c.kv.Remove(c.encodeIdKey(lock.Id))
45 }
46 return nil
47}
48
49// Remove a cached lock by id because it's been relinquished
50func (c *LockCache) RemoveById(id string) error {

Callers 1

TestLockCacheFunction · 0.95

Calls 3

encodeIdKeyMethod · 0.95
GetMethod · 0.65
RemoveMethod · 0.45

Tested by 1

TestLockCacheFunction · 0.76