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

Method EncodedObject

storage/memory/storage.go:221–228  ·  view source on GitHub ↗
(t plumbing.ObjectType, h plumbing.Hash)

Source from the content-addressed store, hash-verified

219}
220
221func (tx *TxObjectStorage) EncodedObject(t plumbing.ObjectType, h plumbing.Hash) (plumbing.EncodedObject, error) {
222 obj, ok := tx.Objects[h]
223 if !ok || (plumbing.AnyObject != t && obj.Type() != t) {
224 return nil, plumbing.ErrObjectNotFound
225 }
226
227 return obj, nil
228}
229
230func (tx *TxObjectStorage) Commit() error {
231 for h, obj := range tx.Objects {

Callers

nothing calls this directly

Calls 1

TypeMethod · 0.65

Tested by

no test coverage detected