MCPcopy Create free account
hub / github.com/go-git/go-git / SetEncodedObject

Method SetEncodedObject

storage/memory/storage.go:214–219  ·  view source on GitHub ↗
(obj plumbing.EncodedObject)

Source from the content-addressed store, hash-verified

212}
213
214func (tx *TxObjectStorage) SetEncodedObject(obj plumbing.EncodedObject) (plumbing.Hash, error) {
215 h := obj.Hash()
216 tx.Objects[h] = obj
217
218 return h, nil
219}
220
221func (tx *TxObjectStorage) EncodedObject(t plumbing.ObjectType, h plumbing.Hash) (plumbing.EncodedObject, error) {
222 obj, ok := tx.Objects[h]

Callers

nothing calls this directly

Calls 1

HashMethod · 0.65

Tested by

no test coverage detected