GetCommit gets a commit from an object storer and decodes it.
(s storer.EncodedObjectStorer, h plumbing.Hash)
| 122 | |
| 123 | // GetCommit gets a commit from an object storer and decodes it. |
| 124 | func GetCommit(s storer.EncodedObjectStorer, h plumbing.Hash) (*Commit, error) { |
| 125 | o, err := s.EncodedObject(plumbing.CommitObject, h) |
| 126 | if err != nil { |
| 127 | return nil, err |
| 128 | } |
| 129 | |
| 130 | return DecodeCommit(s, o) |
| 131 | } |
| 132 | |
| 133 | // DecodeCommit decodes an encoded object into a *Commit and associates it to |
| 134 | // the given object storer. |
searching dependent graphs…