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

Method EncodedObject

storage/transactional/object.go:46–53  ·  view source on GitHub ↗

EncodedObject honors the storer.EncodedObjectStorer interface.

(t plumbing.ObjectType, h plumbing.Hash)

Source from the content-addressed store, hash-verified

44
45// EncodedObject honors the storer.EncodedObjectStorer interface.
46func (o *ObjectStorage) EncodedObject(t plumbing.ObjectType, h plumbing.Hash) (plumbing.EncodedObject, error) {
47 obj, err := o.EncodedObjectStorer.EncodedObject(t, h)
48 if err == plumbing.ErrObjectNotFound {
49 return o.temporal.EncodedObject(t, h)
50 }
51
52 return obj, err
53}
54
55// IterEncodedObjects honors the storer.EncodedObjectStorer interface.
56func (o *ObjectStorage) IterEncodedObjects(t plumbing.ObjectType) (storer.EncodedObjectIter, error) {

Calls 1

EncodedObjectMethod · 0.65

Tested by 1