Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: respect .gitignore #97

Merged
merged 19 commits into from
Aug 2, 2023
Merged

feat: respect .gitignore #97

merged 19 commits into from
Aug 2, 2023

Conversation

moshfeu
Copy link
Owner

@moshfeu moshfeu commented Aug 6, 2022

close #96

@placasse
Copy link

placasse commented Aug 7, 2022

Glad that you like the idea.
Thanks for this fast patch.

Some points:

@moshfeu
Copy link
Owner Author

moshfeu commented Aug 13, 2022

Thank you for the valuable feedback!

I'll take care of the points you mentioned.
About the .gitignore in subfolders, it's more tricky. I'd prefer to have another issue and see how much demand this request has and meantime to focus on other feature requests. Sounds fair?

@stale
Copy link

stale bot commented Nov 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Nov 9, 2022
@stale stale bot closed this Nov 22, 2022
@moshfeu moshfeu reopened this Jul 28, 2023
@stale stale bot removed the wontfix This will not be worked on label Jul 28, 2023
@moshfeu
Copy link
Owner Author

moshfeu commented Jul 28, 2023

Bottom line, this PR adds the core feature and handles patterns start with !
A follow up PR will handle .git folder.
Need to check about the rest two.

@moshfeu
Copy link
Owner Author

moshfeu commented Jul 29, 2023

Almost a year later 😅 I finalized the feature but ".gitignore files from sub-folders should also be read" which, as I mentioned, more complicated.. not rocket science, but still.

@placasse would you mind to give it a try?

compare-folders-0.23.0.vsix.zip

@atplacasse
Copy link

Sure!
Here is a test case not yet working. Given this .gitgnore:

a*
!a1.txt

then file a1.txt should not be ignored.

@moshfeu
Copy link
Owner Author

moshfeu commented Jul 31, 2023

Thanks for the quick feedback!
@gliviu any advice here? Should includeFilter: a1.txt take over excludeFilter: a*?

@atplacasse If this is the only issue, I'll merge the PR and kindly ask you to create a new issue so people could enjoy the feature until we figure it out.

@gliviu
Copy link

gliviu commented Jul 31, 2023

Sure. I will take a look in the next few days.

@moshfeu
Copy link
Owner Author

moshfeu commented Jul 31, 2023

Sure. I will take a look in the next few days.

Thanks 🙏

@atplacasse
Copy link

@moshfeu Ok then I created #126

@moshfeu
Copy link
Owner Author

moshfeu commented Aug 2, 2023

@moshfeu Ok then I created #126

Thanks

@moshfeu moshfeu merged commit ecdb0d2 into master Aug 2, 2023
4 checks passed
@moshfeu moshfeu deleted the respect-git-ignore branch August 2, 2023 04:20
@moshfeu moshfeu mentioned this pull request Dec 31, 2023
moshfeu added a commit that referenced this pull request Jan 4, 2024
resolve #126 following @gliviu's suggestion
continues the work at #97 

Additions

- use node 18 for globby
- `skipLibCheck` because globy's type check has failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request] Add an option to auto exclude files from .gitignore
4 participants