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

Function GetObject

plumbing/object/object.go:51–58  ·  view source on GitHub ↗

GetObject gets an object from an object storer and decodes it.

(s storer.EncodedObjectStorer, h plumbing.Hash)

Source from the content-addressed store, hash-verified

49
50// GetObject gets an object from an object storer and decodes it.
51func GetObject(s storer.EncodedObjectStorer, h plumbing.Hash) (Object, error) {
52 o, err := s.EncodedObject(plumbing.AnyObject, h)
53 if err != nil {
54 return nil, err
55 }
56
57 return DecodeObject(s, o)
58}
59
60// DecodeObject decodes an encoded object into an Object and associates it to
61// the given object storer.

Callers 3

createTagObjectMethod · 0.92
walkObjectTreeMethod · 0.92
addReachableTagsMethod · 0.92

Calls 2

DecodeObjectFunction · 0.85
EncodedObjectMethod · 0.65

Tested by

no test coverage detected