-
Notifications
You must be signed in to change notification settings - Fork 80
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
Pattern **/ matches everything #83
Comments
It looks like I’m a little uneasy about making behavioural changes to this library though at this stage, even though this seems like the way you’d first expect this to work. There’s appetite in #59 to replace the internals of this crate with |
That makes sense. I have been thinking about further issues with my proposed solution but I haven't put them to the test yet. I will close the issue and pull request. |
How about we keep the issue open because I think it's a legitimate concern, but whether and how we go about solving it is an open question? |
Ok. |
Ah I think that would end up masking any regressions the tests catch. |
What about performance? I've seen that globset is using regex. I assume that regular expressions are slower than the matchers in glob. |
Why? Have you measured it? |
I have no benchmarks yet for glob Pattern matching and globset. But my experience with other languages is that regex compared to simple string search is much slower. This is clear because regex can be very complex. The matching algorithm in glob seems to be simple. So I would assume that it is fast. |
@brmmm3 In many cases, regex is complex precisely because it is built to be fast. globset should not ever be much slower than (globset does have some benchmarks comparing this crate and globset, but they aren't comprehensive.) |
I've run some benchmarks using the recursive wildcards tests with glob and globset. globset was only a bit slower (<4%). I'm impressed. Thumbs up for globset :-) |
Hi.
Using glob version 0.3.0.
The pattern **/ should match all folders recursively. However it seems to also match files. Not sure if this is as intended, however in bash **/ works for matching folders only.
My test (fails on path3):
If this is something to be fixed, I can look into it.
The text was updated successfully, but these errors were encountered: