aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/blob.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/object/blob.go')
-rw-r--r--plumbing/object/blob.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/plumbing/object/blob.go b/plumbing/object/blob.go
index 76b0e7d..e44753c 100644
--- a/plumbing/object/blob.go
+++ b/plumbing/object/blob.go
@@ -92,16 +92,17 @@ type BlobIter struct {
s storer.EncodedObjectStorer
}
-// NewBlobIter returns a BlobIter for the given repository and underlying
-// object iterator.
+// NewBlobIter takes a storer.EncodedObjectStorer and a
+// storer.EncodedObjectIter and returns a *BlobIter that iterates over all
+// blobs contained in the storer.EncodedObjectIter.
//
-// The returned BlobIter will automatically skip over non-blob objects.
+// Any non-blob object returned by the storer.EncodedObjectIter is skipped.
func NewBlobIter(s storer.EncodedObjectStorer, iter storer.EncodedObjectIter) *BlobIter {
return &BlobIter{iter, s}
}
-// Next moves the iterator to the next blob 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 blob and returns a pointer to it. If
+// there are no more blobs, it returns io.EOF.
func (iter *BlobIter) Next() (*Blob, error) {
for {
obj, err := iter.EncodedObjectIter.Next()