-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
globset (and thus ripgrep) interpret braces ({}) as alternative ("a or b") whereas git doesn't #1221
Comments
IMO, one thing that ripgrep probably should do, regardless of whether it disables brace expansion in
It still wouldn't match Git's behaviour exactly, but i imagine it'd be a lot harder to trigger the difference in practice. |
I was about to open a new issue, but my problem is the same as this one. Reproducer:
Note that |
This syntax does not exist in `git`, so it is not documented in `man gitignore`. There is a question of whether it *should* exist, but as long as it does, it should be documented somewhere. See also: BurntSushi#1221 BurntSushi#1368
This one raises an issue for my application of ripgrep, so I'm willing to work on a PR for it if the following sounds ok to you:
Please let me know if that'd be potentially merged. The main issue I see is |
What version of ripgrep are you using?
ripgrep 0.9.0
-SIMD -AVX
How did you install ripgrep?
Fedora 29 distro package.
What operating system are you using ripgrep on?
Fedora 29.
Describe your question, feature request, or bug.
globset (and thus ripgrep) interpret braces (
{}
) as alternative ("a or b") whereas git doesn't, causing a different interpretation of entries containing braces in .gitignore.If this is a bug, what are the steps to reproduce the behavior?
If this is a bug, what is the actual behavior?
If this is a bug, what is the expected behavior?
rg --files
should listfoo.txt
and ignorefoo.txt{}
(matching git's behavior), not the opposite.The text was updated successfully, but these errors were encountered: