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

Method Next

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

480// Next moves the iterator to the next commit and returns a pointer to it. If
481// there are no more commits, it returns io.EOF.
482func (iter *storerCommitIter) Next() (*Commit, error) {
483 obj, err := iter.EncodedObjectIter.Next()
484 if err != nil {
485 return nil, err
486 }
487
488 return DecodeCommit(iter.s, obj)
489}
490
491// ForEach call the cb function for each commit contained on this iter until
492// 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