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

storage/filesystem: keep packs open in PackfileIter #962

Merged
merged 2 commits into from
Sep 21, 2018

Conversation

jfontan
Copy link
Contributor

@jfontan jfontan commented Sep 20, 2018

PackfileIter was not taking into account the option KeepDescriptors and was always closing the file. This caused "file already closed" errors when iterating packfiles in with KeepDescriptors active.

PackfileIter was not taking into account the option KeepDescriptors
and was always closing the file. This caused "file already closed"
errors when iterating packfiles in with KeepDescriptors active.

Signed-off-by: Javi Fontan <[email protected]>
pack billy.File
iter storer.EncodedObjectIter
seen map[plumbing.Hash]struct{}
keepPack bool
}

// NewPackfileIter returns a new EncodedObjectIter for the provided packfile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some documentation about keepPack

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@mcuadros mcuadros merged commit c2ab4ac into src-d:master Sep 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants