filesystem support for exclude and include filters (2nd attemp) #1033
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sorry I have messed up completely and somehow GitHub did not recognize that I want only my 2 commits to be merged and showed up bunch of changes from upstream 🤷♂️
Previous "broken" attempt: #881 had approve but were not merged and later on broken by me trying to fix conflicts
Closes: #536 and technically closes: #865
What has been done:
I have moved the git filter creation a little bit lower into its switch case
And created similar filter creation in the filesystem switch case
Because of that go asked me to put err := below
For filesystem engine, itself did not want to touch it so just added one more "method" WithFilter() so it can be used where needed
In the same way, as in the git source, we are checking if the filter is not nil and the current file passes it