-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
ripgrep mis-parses *[\<\>\:\"\/\\\|\?\*]*
in .gitignore
#2745
Comments
I'll call this a bug since it doesn't match what I haven't investigated this one in particular. It's possible there's an easy fix. If so, patches are welcome. |
I thought the example you provided was interesting. Step 1. Create a directory as follows
Step 2. Edit .gitignore
There are two controlled trials
Step 3. View the result.
rg tracking results:
Analysis of results: |
Please tick this box to confirm you have reviewed the above.
What version of ripgrep are you using?
ripgrep 14.1.0 (rev e50df40)
features:-simd-accel,+pcre2
simd(compile):+SSE2,-SSSE3,-AVX2
simd(runtime):+SSE2,+SSSE3,+AVX2
PCRE2 10.42 is available (JIT is available)
How did you install ripgrep?
Github release
ripgrep_14.1.0-1_amd64.deb
What operating system are you using ripgrep on?
WSL2: Ubuntu (Linux x64 5.10.102.1-microsoft-standard-WSL2)
Describe your bug.
Ripgrep doesn't interpret
*[\<\>\:\"\/\\\|\?\*]*
in.gitignore
in the same way that git does.What are the steps to reproduce the behavior?
where the gitignore contains the following:
git init
git status
-> notice that no files are ignored by git.rg --files
-> notice that onlyfoo.txt
is picked up, notbar.txt
.What is the actual behavior?
What is the expected behavior?
ripgrep should have returned:
The text was updated successfully, but these errors were encountered: