-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for helping out @corntoole!
I've made a few suggestions for code changes inline.
Could we also add a test that verifies that using a .gitignore style file works?
Thanks for the review @dirkmc . I just pushed a commit to address most of the suggestions, and will respond to the remaining unresolved comments shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filtering looks good but we need to make a few changes to the integration.
LGTM. Thanks! Could you rebase on master and squash? (we usually use merge commits to track PRs/features but I try to avoid reverse-merge commits). |
- add a filter that defines rules for ignoring hidden and/or files listed explicitly or defined in a gitignore file - update SerialFile construct to accept a Filter feat(add-file-ignore): fix tests, slight refactor - add new SerialFile constructor with original signature for backward compatibility - update tests for new SerialFile behavior feat(file-ignore): cleanup code+tests - address PR comments - add more documentation - use existing function for cross-platform hidden file detection - be more consistent when checking for hidden fies - add more examples+test cases feat(file-ignore): rework `Filter` constructor - add filter tests feat(file-ignore): apply exclude rules lazily - apply exclude rules from filter when iterating over dir contents instead of at serialFile construction time
8de2da5
to
90aef3a
Compare
Is this okay? I figured that you didn't mean Squash and merge since I don't have write access. |
Yep. Just squash and rebase. Thanks! |
…ignore-rules Feat/add ignore rules This commit was moved from ipfs/go-ipfs-files@642f445
This PR adds a
Filter
object that can be used to define rules for which files should be ignored during ipfs file commands. It also updates theserialFile
type to use a filter to determine which files should be included. This is the first PR toward the re-implementation of the file ignore feature in go-ipfs: ipfs/kubo#3643