aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/commit_walker_file.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/object/commit_walker_file.go')
-rw-r--r--plumbing/object/commit_walker_file.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/plumbing/object/commit_walker_file.go b/plumbing/object/commit_walker_file.go
index 6f16e61..b73e4ce 100644
--- a/plumbing/object/commit_walker_file.go
+++ b/plumbing/object/commit_walker_file.go
@@ -128,6 +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 == io.EOF {
+ break
+ }
if nextErr != nil {
return nextErr
}
@@ -138,6 +141,7 @@ func (c *commitFileIter) ForEach(cb func(*Commit) error) error {
return err
}
}
+ return nil
}
func (c *commitFileIter) Close() {