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

Method EncodedObjectSize

plumbing/storer/object_test.go:145–153  ·  view source on GitHub ↗
(h plumbing.Hash)

Source from the content-addressed store, hash-verified

143}
144
145func (o *MockObjectStorage) EncodedObjectSize(h plumbing.Hash) (
146 size int64, err error) {
147 for _, o := range o.db {
148 if o.Hash() == h {
149 return o.Size(), nil
150 }
151 }
152 return 0, plumbing.ErrObjectNotFound
153}
154
155func (o *MockObjectStorage) EncodedObject(t plumbing.ObjectType, h plumbing.Hash) (plumbing.EncodedObject, error) {
156 for _, o := range o.db {

Callers

nothing calls this directly

Calls 2

HashMethod · 0.65
SizeMethod · 0.65

Tested by

no test coverage detected