Method
EncodedObject
(t plumbing.ObjectType, h plumbing.Hash)
Source from the content-addressed store, hash-verified
| 219 | } |
| 220 | |
| 221 | func (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 | |
| 230 | func (tx *TxObjectStorage) Commit() error { |
| 231 | for h, obj := range tx.Objects { |
Callers
nothing calls this directly
Tested by
no test coverage detected