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
Ignore file in subdirectory not applied properly #287
Comments
Fix ggreer#287 but doesn't fix ggreer#144
Seems to be fixed by #284 now, thanks! |
Fix ggreer#287 but doesn't fix ggreer#144
Fix ggreer#287 but doesn't fix ggreer#144
Fix ggreer#287 but doesn't fix ggreer#144
Attempt to fix issue 275 Only increment the scandir baton when recursing Fix ggreer#285 but needs testing for more complex directories Check ignore paths based on correct baton level Fix ggreer#287 but doesn't fix ggreer#144 Stop comparing terminating NULL in path string Might save a few cycles... Handle absolute .gitignore patterns properly Pattern /b/c/d should ignore /b/c/d but not a/b/c/d
Attempt to fix issue 275 Only increment the scandir baton when recursing Fix ggreer#285 but needs testing for more complex directories Check ignore paths based on correct baton level Fix ggreer#287 but doesn't fix ggreer#144 Stop comparing terminating NULL in path string Might save a few cycles... Handle absolute .gitignore patterns properly Pattern /b/c/d should ignore /b/c/d but not a/b/c/d
Attempt to fix issue 275 Only increment the scandir baton when recursing Fix ggreer#285 but needs testing for more complex directories Check ignore paths based on correct baton level Fix ggreer#287 but doesn't fix ggreer#144 Stop comparing terminating NULL in path string Might save a few cycles... Handle absolute .gitignore patterns properly Pattern /b/c/d should ignore /b/c/d but not a/b/c/d
Attempt to fix issue 275 Only increment the scandir baton when recursing Fix ggreer#285 but needs testing for more complex directories Check ignore paths based on correct baton level Fix ggreer#287 but doesn't fix ggreer#144 Stop comparing terminating NULL in path string Might save a few cycles... Handle absolute .gitignore patterns properly Pattern /b/c/d should ignore /b/c/d but not a/b/c/d
Attempt to fix issue 275 Only increment the scandir baton when recursing Fix ggreer#285 but needs testing for more complex directories Check ignore paths based on correct baton level Fix ggreer#287 but doesn't fix ggreer#144 Stop comparing terminating NULL in path string Might save a few cycles... Handle absolute .gitignore patterns properly Pattern /b/c/d should ignore /b/c/d but not a/b/c/d
Attempt to fix issue 275 Only increment the scandir baton when recursing Fix ggreer#285 but needs testing for more complex directories Check ignore paths based on correct baton level Fix ggreer#287 but doesn't fix ggreer#144 Stop comparing terminating NULL in path string Might save a few cycles... Handle absolute .gitignore patterns properly Pattern /b/c/d should ignore /b/c/d but not a/b/c/d
Attempt to fix issue 275 Only increment the scandir baton when recursing Fix ggreer#285 but needs testing for more complex directories Check ignore paths based on correct baton level Fix ggreer#287 but doesn't fix ggreer#144 Stop comparing terminating NULL in path string Might save a few cycles... Handle absolute .gitignore patterns properly Pattern /b/c/d should ignore /b/c/d but not a/b/c/d
I can repro this issue as described with ag 0.30.0 on a Linux ext4 filesystem. |
I can confirm this issue exists on v2.0.0 as well. Initially, I thought the nested .gitignore files were being ignored due to the usage of the '-G' flag, but I have since confirmed that it is only the top-most .gitignore directory which seems to be consulted. My specific use case is to find occurrences within specific named files within any of the sub-directories. Ex: Should this type of search work? Thanks for this tool btw ... it's great! |
Same problem here. I've switched to ripgrep. It's inspired by the Silver Searcher. It handles parent & nested ignore files correctly. This is great for searching across multiple projects in the same folder. Also for descending (or not) into node_modules, like in @justinaray's case. |
Thanks for the ripgrep suggestion @john-kurkowski! Will take a look. I was pretty surprised that nested ignore files are not supported in Silver Searcher. Assuming it is computationally expensive to find the nearest ignore and apply? Maybe something that could be mentioned in the README or help? |
ggreer/the_silver_searcher#287 still hasn't been fixed after 8 years. RipGrep handles .gitignore in subdirectories correctly, and is supposedly faster, so try it out.
As in #275, this might be filesystem-specific, although this seems like a simpler case.
For what it's worth, pull request #284 does not fix this.
The text was updated successfully, but these errors were encountered: