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

Method Next

plumbing/object/commit_walker_limit.go:27–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25}
26
27func (c *commitLimitIter) Next() (*Commit, error) {
28 for {
29 commit, err := c.sourceIter.Next()
30 if err != nil {
31 return nil, err
32 }
33
34 if c.limitOptions.Since != nil && commit.Committer.When.Before(*c.limitOptions.Since) {
35 continue
36 }
37 if c.limitOptions.Until != nil && commit.Committer.When.After(*c.limitOptions.Until) {
38 continue
39 }
40 return commit, nil
41 }
42}
43
44func (c *commitLimitIter) ForEach(cb func(*Commit) error) error {
45 for {

Callers 1

ForEachMethod · 0.95

Calls 1

NextMethod · 0.65

Tested by

no test coverage detected