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

Method Next

plumbing/object/commit.go:573–580  ·  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

571// Next moves the iterator to the next commit and returns a pointer to it. If
572// there are no more commits, it returns io.EOF.
573func (iter *storerCommitIter) Next() (*Commit, error) {
574 obj, err := iter.EncodedObjectIter.Next()
575 if err != nil {
576 return nil, err
577 }
578
579 return DecodeCommit(iter.s, obj)
580}
581
582// ForEach call the cb function for each commit contained on this iter until
583// an error appends or the end of the iter is reached. If ErrStop is sent

Callers

nothing calls this directly

Calls 2

DecodeCommitFunction · 0.85
NextMethod · 0.65

Tested by

no test coverage detected