aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/object.go
diff options
context:
space:
mode:
authorJavi Fontan <jfontan@gmail.com>2018-09-21 10:43:43 +0200
committerJavi Fontan <jfontan@gmail.com>2018-09-21 10:43:43 +0200
commita7b0102b83aa86fd299623d35666bfee93fee0c6 (patch)
treea5797901db8d24343a73bbc7423c0ef38a61aa60 /storage/filesystem/object.go
parent82c7a306db75d083db50dbd41aebebd8bd55081b (diff)
downloadgo-git-a7b0102b83aa86fd299623d35666bfee93fee0c6.tar.gz
storage/filesystem: add more doc to NewPackfileIter
Signed-off-by: Javi Fontan <jfontan@gmail.com>
Diffstat (limited to 'storage/filesystem/object.go')
-rw-r--r--storage/filesystem/object.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/storage/filesystem/object.go b/storage/filesystem/object.go
index 4aedacc..68bd140 100644
--- a/storage/filesystem/object.go
+++ b/storage/filesystem/object.go
@@ -476,15 +476,18 @@ func (it *lazyPackfilesIter) Close() {
}
type packfileIter struct {
- pack billy.File
- iter storer.EncodedObjectIter
- seen map[plumbing.Hash]struct{}
+ pack billy.File
+ iter storer.EncodedObjectIter
+ seen map[plumbing.Hash]struct{}
+
+ // tells whether the pack file should be left open after iteration or not
keepPack bool
}
// NewPackfileIter returns a new EncodedObjectIter for the provided packfile
// and object type. Packfile and index file will be closed after they're
-// used.
+// used. If keepPack is true the packfile won't be closed after the iteration
+// finished.
func NewPackfileIter(
fs billy.Filesystem,
f billy.File,