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

Method Next

plumbing/object/commitgraph/commitnode.go:65–75  ·  view source on GitHub ↗

Next moves the iterator to the next commit and returns a pointer to it. If there are no more commits, it returns io.EOF.

()

Source from the content-addressed store, hash-verified

63// Next moves the iterator to the next commit and returns a pointer to it. If
64// there are no more commits, it returns io.EOF.
65func (iter *parentCommitNodeIter) Next() (CommitNode, error) {
66 obj, err := iter.node.ParentNode(iter.i)
67 if err == object.ErrParentNotFound {
68 return nil, io.EOF
69 }
70 if err == nil {
71 iter.i++
72 }
73
74 return obj, err
75}
76
77// ForEach call the cb function for each commit contained on this iter until
78// an error appends or the end of the iter is reached. If ErrStop is sent

Callers 1

ForEachMethod · 0.95

Calls 1

ParentNodeMethod · 0.65

Tested by

no test coverage detected