MCPcopy Create free account
hub / github.com/go-git/go-git / Parents

Method Parents

plumbing/object/commit.go:126–130  ·  view source on GitHub ↗

Parents return a CommitIter to the parent Commits.

()

Source from the content-addressed store, hash-verified

124
125// Parents return a CommitIter to the parent Commits.
126func (c *Commit) Parents() CommitIter {
127 return NewCommitIter(c.s,
128 storer.NewEncodedObjectLookupIter(c.s, plumbing.CommitObject, c.ParentHashes),
129 )
130}
131
132// NumParents returns the number of parents in a commit.
133func (c *Commit) NumParents() int {

Callers 7

ResolveRevisionMethod · 0.95
StatsContextMethod · 0.95
parentsContainingPathFunction · 0.80
TestParentsMethod · 0.80
TestCommitIterNextMethod · 0.80
NextMethod · 0.80
TestNewCommitMethod · 0.80

Calls 2

NewCommitIterFunction · 0.85

Tested by 3

TestParentsMethod · 0.64
TestCommitIterNextMethod · 0.64
TestNewCommitMethod · 0.64