()
| 25 | } |
| 26 | |
| 27 | func (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 | |
| 44 | func (c *commitLimitIter) ForEach(cb func(*Commit) error) error { |
| 45 | for { |