Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit a7b0102

Browse files
committed
storage/filesystem: add more doc to NewPackfileIter
Signed-off-by: Javi Fontan <jfontan@gmail.com>
1 parent 82c7a30 commit a7b0102

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

storage/filesystem/object.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,15 +476,18 @@ func (it *lazyPackfilesIter) Close() {
476476
}
477477

478478
type packfileIter struct {
479-
pack billy.File
480-
iter storer.EncodedObjectIter
481-
seen map[plumbing.Hash]struct{}
479+
pack billy.File
480+
iter storer.EncodedObjectIter
481+
seen map[plumbing.Hash]struct{}
482+
483+
// tells whether the pack file should be left open after iteration or not
482484
keepPack bool
483485
}
484486

485487
// NewPackfileIter returns a new EncodedObjectIter for the provided packfile
486488
// and object type. Packfile and index file will be closed after they're
487-
// used.
489+
// used. If keepPack is true the packfile won't be closed after the iteration
490+
// finished.
488491
func NewPackfileIter(
489492
fs billy.Filesystem,
490493
f billy.File,

0 commit comments

Comments
 (0)