aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/object.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/object/object.go')
-rw-r--r--plumbing/object/object.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/plumbing/object/object.go b/plumbing/object/object.go
index 5512932..53c7e6c 100644
--- a/plumbing/object/object.go
+++ b/plumbing/object/object.go
@@ -158,14 +158,15 @@ type ObjectIter struct {
s storer.EncodedObjectStorer
}
-// NewObjectIter returns a ObjectIter for the given repository and underlying
-// object iterator.
+// NewObjectIter takes a storer.EncodedObjectStorer and a
+// storer.EncodedObjectIter and returns an *ObjectIter that iterates over all
+// objects contained in the storer.EncodedObjectIter.
func NewObjectIter(s storer.EncodedObjectStorer, iter storer.EncodedObjectIter) *ObjectIter {
return &ObjectIter{iter, s}
}
-// Next moves the iterator to the next object and returns a pointer to it. If it
-// has reached the end of the set it will return io.EOF.
+// Next moves the iterator to the next object and returns a pointer to it. If
+// there are no more objects, it returns io.EOF.
func (iter *ObjectIter) Next() (Object, error) {
for {
obj, err := iter.EncodedObjectIter.Next()