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

Struct SortReadObject

plumbing/object/tree_test.go:176–181  ·  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

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected