MCPcopy
hub / github.com/go-git/go-git / SortReadObject

Struct SortReadObject

plumbing/object/tree_test.go:181–186  ·  view source on GitHub ↗

This plumbing.EncodedObject implementation has a reader that only returns 6 bytes at a time, this should simulate the conditions when a read returns less bytes than asked, for example when reading a hash which is bigger than 6 bytes.

Source from the content-addressed store, hash-verified

179// returns less bytes than asked, for example when reading a hash which
180// is bigger than 6 bytes.
181type SortReadObject struct {
182 t plumbing.ObjectType
183 h plumbing.Hash
184 cont []byte
185 sz int64
186}
187
188func (o *SortReadObject) Hash() plumbing.Hash { return o.h }
189func (o *SortReadObject) Type() plumbing.ObjectType { return o.t }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected