aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing')
-rw-r--r--plumbing/object/commit_walker_file.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/plumbing/object/commit_walker_file.go b/plumbing/object/commit_walker_file.go
index 6f16e61..76c158b 100644
--- a/plumbing/object/commit_walker_file.go
+++ b/plumbing/object/commit_walker_file.go
@@ -128,7 +128,9 @@ func isParentHash(hash plumbing.Hash, commit *Commit) bool {
func (c *commitFileIter) ForEach(cb func(*Commit) error) error {
for {
commit, nextErr := c.Next()
- if nextErr != nil {
+ if nextErr == io.EOF {
+ break
+ } else if nextErr != nil {
return nextErr
}
err := cb(commit)
@@ -138,6 +140,7 @@ func (c *commitFileIter) ForEach(cb func(*Commit) error) error {
return err
}
}
+ return nil
}
func (c *commitFileIter) Close() {