From f5c23dae1fc7508b2d5cbac5a2954203ea4c3ac2 Mon Sep 17 00:00:00 2001 From: Arran Walker Date: Sun, 21 Apr 2019 00:37:59 +0000 Subject: filesystem: ObjectStorage, MaxOpenDescriptors option The MaxOpenDescriptors option provides a middle ground solution between keeping all packfiles open (as offered by the KeepDescriptors option) and keeping none open. Signed-off-by: Arran Walker --- plumbing/format/packfile/packfile.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plumbing') diff --git a/plumbing/format/packfile/packfile.go b/plumbing/format/packfile/packfile.go index 69b6e85..c09286e 100644 --- a/plumbing/format/packfile/packfile.go +++ b/plumbing/format/packfile/packfile.go @@ -414,6 +414,11 @@ func (p *Packfile) ID() (plumbing.Hash, error) { return hash, nil } +// Scanner returns the packfile's Scanner +func (p *Packfile) Scanner() *Scanner { + return p.s +} + // Close the packfile and its resources. func (p *Packfile) Close() error { closer, ok := p.file.(io.Closer) -- cgit