DecodeCommit decodes an encoded object into a *Commit and associates it to the given object storer.
(s storer.EncodedObjectStorer, o plumbing.EncodedObject)
| 133 | // DecodeCommit decodes an encoded object into a *Commit and associates it to |
| 134 | // the given object storer. |
| 135 | func 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. |
| 145 | func (c *Commit) Tree() (*Tree, error) { |
searching dependent graphs…