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

Method EncodedObjectSize

storage/transactional/object.go:36–43  ·  view source on GitHub ↗

EncodedObjectSize honors the storer.EncodedObjectStorer interface.

(h plumbing.Hash)

Source from the content-addressed store, hash-verified

34
35// EncodedObjectSize honors the storer.EncodedObjectStorer interface.
36func (o *ObjectStorage) EncodedObjectSize(h plumbing.Hash) (int64, error) {
37 sz, err := o.EncodedObjectStorer.EncodedObjectSize(h)
38 if err == plumbing.ErrObjectNotFound {
39 return o.temporal.EncodedObjectSize(h)
40 }
41
42 return sz, err
43}
44
45// EncodedObject honors the storer.EncodedObjectStorer interface.
46func (o *ObjectStorage) EncodedObject(t plumbing.ObjectType, h plumbing.Hash) (plumbing.EncodedObject, error) {

Calls 1

EncodedObjectSizeMethod · 0.65

Tested by 1