MCPcopy Index your code
hub / github.com/go-git/go-git / decodeObjectAt

Method decodeObjectAt

storage/filesystem/object.go:493–510  ·  view source on GitHub ↗
(
	p *packfile.Packfile,
	offset int64,
)

Source from the content-addressed store, hash-verified

491}
492
493func (s *ObjectStorage) decodeObjectAt(
494 p *packfile.Packfile,
495 offset int64,
496) (plumbing.EncodedObject, error) {
497 hash, err := p.FindHash(offset)
498 if err == nil {
499 obj, ok := s.objectCache.Get(hash)
500 if ok {
501 return obj, nil
502 }
503 }
504
505 if err != nil && err != plumbing.ErrObjectNotFound {
506 return nil, err
507 }
508
509 return p.GetByOffset(offset)
510}
511
512func (s *ObjectStorage) decodeDeltaObjectAt(
513 p *packfile.Packfile,

Callers 2

getFromPackfileMethod · 0.95
decodeDeltaObjectAtMethod · 0.95

Calls 3

GetByOffsetMethod · 0.80
FindHashMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected