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

Method Set

tools/kv/keyvaluestore.go:58–64  ·  view source on GitHub ↗

Set updates the key/value store in memory Changes are not persisted until you call Save()

(key string, value interface{})

Source from the content-addressed store, hash-verified

56// Set updates the key/value store in memory
57// Changes are not persisted until you call Save()
58func (k *Store) Set(key string, value interface{}) {
59 k.mu.Lock()
60 defer k.mu.Unlock()
61
62 k.db[key] = value
63 k.logChange(setOperation, key, value)
64}
65
66// Remove removes the key and its value from the store in memory
67// Changes are not persisted until you call Save()

Callers 3

TestStoreSimpleFunction · 0.95
TestStoreReduceSizeFunction · 0.95

Calls 3

logChangeMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by 3

TestStoreSimpleFunction · 0.76
TestStoreReduceSizeFunction · 0.76