MCPcopy
hub / github.com/go-git/go-git / Parents

Method Parents

plumbing/object/commit.go:180–184  ·  view source on GitHub ↗

Parents return a CommitIter to the parent Commits.

()

Source from the content-addressed store, hash-verified

178
179// Parents return a CommitIter to the parent Commits.
180func (c *Commit) Parents() CommitIter {
181 return NewCommitIter(c.s,
182 storer.NewEncodedObjectLookupIter(c.s, plumbing.CommitObject, c.ParentHashes),
183 )
184}
185
186// NumParents returns the number of parents in a commit.
187func (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