-
Notifications
You must be signed in to change notification settings - Fork 280
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
Since version 1.24.0 finding files recursively is broken #334
Comments
Thanks for the report, I can confirm that it worked with 1.23.0, but not with 1.24.0 and versions above. My understanding of the problem is that #283 was incorrect, and we should revert it. @dafyddj @jsok what do you think? The problem comes from the fact that python-pathspec configured with >>> import pathspec
>>> p = pathspec.PathSpec.from_lines('gitwildmatch', ['*.yaml'])
>>> p.match_file('file.yaml')
True
>>> p.match_file('dir/file.sql')
False
>>> p.match_file('dir.yaml/file.sql')
True I don't know whether it's the expected behavior, so I asked at cpburnz/python-pathspec#41. |
Partially reverts a221898 to fix #334 Linked to cpburnz/python-pathspec#41.
This problem was reported again (in #390). I still think that #283 introduced a bigger problem than the one it solved, and we should revert it. @jsok @dafyddj @andrewimeson what do you think? |
@andrewimeson thanks for your feedback. Solving #279 without breaking the directory matching seems possible, but complex (see discussion at cpburnz/python-pathspec#41). We can wait for other users' feedback, but if someone wants to solve #334 by reverting commit a221898, I'm +1 to merge it. |
This problem was reported again (in #546). Now that pathspec has a new Unfortunately the author of the problematic PR @jsok doesn't answer. To anyone who wants to tackle the problem: contribution welcome! |
If #283 is broken then revert it 😃 |
I believe PR #283 introduced a flaw in finding files recursively when specifying a directory search on the command line.
Specifically you can no longer check files only within a specific subdirectory.
The code in the PR strips out the directory information so after that you can no longer make any decisions based on full directory path.
The set of command below demonstrates the issue.
The text was updated successfully, but these errors were encountered: