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

Function DecodeCommit

plumbing/object/commit.go:135–142  ·  view source on GitHub ↗

DecodeCommit decodes an encoded object into a *Commit and associates it to the given object storer.

(s storer.EncodedObjectStorer, o plumbing.EncodedObject)

Source from the content-addressed store, hash-verified

133// DecodeCommit decodes an encoded object into a *Commit and associates it to
134// the given object storer.
135func DecodeCommit(s storer.EncodedObjectStorer, o plumbing.EncodedObject) (*Commit, error) {
136 c := &Commit{s: s}
137 if err := c.Decode(o); err != nil {
138 return nil, err
139 }
140
141 return c, nil
142}
143
144// Tree returns the Tree from the commit.
145func (c *Commit) Tree() (*Tree, error) {

Callers 8

TestStringMultiLineMethod · 0.85
DecodeObjectFunction · 0.85
CommitMethod · 0.85
GetCommitFunction · 0.85
NextMethod · 0.85
ForEachMethod · 0.85

Calls 1

DecodeMethod · 0.95

Tested by 3

TestStringMultiLineMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…