-
-
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
.gitignore is not used when .git directory does not exist #1229
Comments
Thanks for the bug report! It is definitely intentional that It seems possible for ripgrep to respect Other than creating a dummy |
It's not clear if there's any actionable steps that can be taken here, given my previous comment. If there's any new information to add, please feel free to comment and we can re-open this. |
Can you elaborate on this choice? I noticed a few months ago that ripgrep completely broke for me with respect to .gitignore use and never understood why until today. (I discovered that the correct solution was to switch to .ignore so my workflow is working again now, I'm just curious in the reasoning behind splitting the functionality into two files.) |
ripgrep has always supported both
Because |
FWIW it feels like at least some time ago rg was always respecting My use case: we have a repository that can either be cloned from Mercurial or from Git. And normal workflow is to use Mercurial. So the repo has both |
Indeed it was. Commit e65ca21 changed that by fixing #934.
Sometimes folks rely on bugs accidentally and then get bitten when the bug gets fixed. This is just part of software evolution and there are plenty of trivial work-arounds available to you.
There are several things you can do:
Indeed, it's unlikely. See #6. |
yeah I understand that I came to rely on a peculiarity that could have been considered a bug. Some of the workarounds are not without downsides though -- e.g. an empty I'll go with manual |
@BurntSushi I think This works well enough with my editor, As to how this should be implemented, I'm not really familiar with how ripgrep is implemented; is it possible to use something like the appropriate |
This is the crux of this issue, in addition to the UX. Unfortunately, I don't think your comment really addresses any of the points I raised above. I'd suggest picking one of my suggested work arounds above.
No. That's not how ripgrep works. |
What version of ripgrep are you using?
ripgrep 0.10.0
-SIMD -AVX (compiled)
+SIMD -AVX (runtime)
How did you install ripgrep?
pacman -S ripgrep
What operating system are you using ripgrep on?
Linux euler 5.0.4-arch1-1-ARCH #1 SMP PREEMPT Sat Mar 23 21:00:33 UTC 2019 x86_64 GNU/Linux
Describe your question, feature request, or bug.
When .git/ does not exist, .gitignore is not used. I am unsure whether is this intentional behavior as this line specifically checks for the existence of the folder:
ripgrep/ignore/src/dir.rs
Line 200 in 0913972
I ran across this because I have my home directory in version control and access it by setting GIT_DIR and GIT_WORK_TREE.
I would expect that either:
-or-
I can work around this easily but wanted to check if it would be considered a bug.
If this is a bug, what are the steps to reproduce the behavior?
The text was updated successfully, but these errors were encountered: