diff options
author | Alberto Cortés <alberto@sourced.tech> | 2015-11-16 03:20:01 +0100 |
---|---|---|
committer | Alberto Cortés <alberto@sourced.tech> | 2015-11-25 11:09:51 +0100 |
commit | d643cea1e8a6d618b2eddfdbed086c7bdf208658 (patch) | |
tree | b862c72ccb674910d24eac2ab424a7fb5ea3f0fb /commit.go | |
parent | caab43e7f4ee10a15b2af826485b688473b34356 (diff) | |
download | go-git-d643cea1e8a6d618b2eddfdbed086c7bdf208658.tar.gz |
Blame support for files
This also includes a diff package and revlist package (needed by
blame)
Some extra packfiles (<1MB) are also included, to be used as fixtures in
the tests.
Diffstat (limited to 'commit.go')
-rw-r--r-- | commit.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -45,6 +45,11 @@ func (c *Commit) Parents() *CommitIter { return i } +// NumParents returns the number of parents in a commit. +func (c *Commit) NumParents() int { + return len(c.parents) +} + // Decode transform an core.Object into a Blob struct func (c *Commit) Decode(o core.Object) error { c.Hash = o.Hash() |