diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-05-19 16:44:59 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-05-19 16:44:59 +0200 |
commit | 25077df01588b54ec097ce3f99db6672c5a59463 (patch) | |
tree | 49f7b64f4164d19260ba848c5faca366b75438d1 /commit.go | |
parent | 08f9e7015aad2ca768638b446fb8632f11601899 (diff) | |
download | go-git-25077df01588b54ec097ce3f99db6672c5a59463.tar.gz |
documentation
Diffstat (limited to 'commit.go')
-rw-r--r-- | commit.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -10,6 +10,7 @@ import ( "gopkg.in/src-d/go-git.v3/core" ) +// Hash hash of an object type Hash core.Hash // Commit points to a single tree, marking it as what the project looked like @@ -28,11 +29,13 @@ type Commit struct { r *Repository } +// Tree returns the Tree from the commit func (c *Commit) Tree() *Tree { tree, _ := c.r.Tree(c.tree) // FIXME: Return error as well? return tree } +// Parents return a CommitIter to the parent Commits func (c *Commit) Parents() *CommitIter { return NewCommitIter(c.r, core.NewObjectLookupIter(c.r.Storage, c.parents)) } |