Skip to content
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 returning no results if you mention a directory that is .gitignored #2948

Open
1 task done
jayfoad opened this issue Dec 16, 2024 · 1 comment
Open
1 task done

Comments

@jayfoad
Copy link

jayfoad commented Dec 16, 2024

Please tick this box to confirm you have reviewed the above.

  • I have a different issue.

What version of ripgrep are you using?

ripgrep 14.1.1 (rev 79cbe89)

features:-pcre2
simd(compile):+SSE2,-SSSE3,-AVX2
simd(runtime):+SSE2,+SSSE3,+AVX2

PCRE2 is not available in this build of ripgrep.

How did you install ripgrep?

Built from source with cargo build --release

What operating system are you using ripgrep on?

Ubuntu 24.04.1 LTS

Describe your bug.

In a particular LLVM checkout, this search returns some results:
rg ApplyCallback a/ b/ benchmarks/ bindings/ c/ cmake/ docs/ examples/ include/ lib/ projects/ resources/
But this search returns no results:
rg ApplyCallback a/ b/ benchmarks/ bindings/ c/ cmake/ docs/ examples/ include/ lib/ projects/ resources/ runtimes/
Since I have only specified one extra directory to search, I would not expect fewer results.

What are the steps to reproduce the behavior?

git clone https://github.com/llvm/llvm-project.git
cd llvm-project/llvm
mkdir a b c
rg ApplyCallback */

What is the actual behavior?

The rg command above returns no results.

What is the expected behavior?

The command should return some results, because the search string occurs in e.g. include/llvm/TableGen/TableGenBackend.h.

@jayfoad
Copy link
Author

jayfoad commented Dec 16, 2024

Note that llvm-project/llvm/.gitignore contains:

runtimes/*
!runtimes/*.*

I have seen some related issues like #2498 and #1050 but this one seems to be slightly different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant