MCPcopy Index your code
hub / github.com/go-git/go-git / NumParents

Method NumParents

plumbing/object/commit.go:187–189  ·  view source on GitHub ↗

NumParents returns the number of parents in a commit.

()

Source from the content-addressed store, hash-verified

185
186// NumParents returns the number of parents in a commit.
187func (c *Commit) NumParents() int {
188 return len(c.ParentHashes)
189}
190
191var ErrParentNotFound = errors.New("commit parent not found")
192

Callers 2

NextMethod · 0.95
StatsContextMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected