-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Handling of .gitignore files with escaped spaces is inconsistent with git #659
Comments
Relevant: #526 I had a fix for this that seems to work fine on UNIX, but there are unresolved implications for Windows because |
1. Use ripgrep over the Silver Searcher if it's installed. 2. Finally figured out the issue with .gitignore. I was backslash-escaping spaces in .gitignore, which works for git, but (currently) not for ripgrep or the Silver Searcher. Removing the unnecessary backslashes fixed the issue. Now I can finally :grep much faster than I :vimgrep, and use the external tools for much faster CtrlP-opening. I opened issues on the tools themselves: - BurntSushi/ripgrep#659 - ggreer/the_silver_searcher#1172
Should we mark this as a duplicate of #526? I guess the user facing issue isn't quite the same, but I think they share the same resolution, right? |
Seems right, yeah |
Yep, sorry. I didn't spot that one when I skimmed the existing issues. |
In short, git treats paths with escaped spaces in the same way as paths with spaces. ripgrep doesn't.
Steps to reproduce:
mkdir test_ignore
cd test_ignore
git init
echo "hi there" > "ignore me"
echo "ignore\\ me" >> .gitignore
git status
Note that the "ignore me" file is not listed.rg hi
Observed results:
Expected results:
There should be no output, because ripgrep should be ignoring the "ignore me" file.
I've just fixed my repo not to include the unnecessary escaping, so as far as I'm concerned this is pretty low priority ;).
The text was updated successfully, but these errors were encountered: