ripgrep icon indicating copy to clipboard operation
ripgrep copied to clipboard

ripgrep returning no results if you mention a directory that is .gitignored

Open jayfoad opened this issue 1 year ago • 1 comments

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

  • [X] I have a different issue.

What version of ripgrep are you using?

ripgrep 14.1.1 (rev 79cbe89deb)

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 avatar Dec 16 '24 15:12 jayfoad

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.

jayfoad avatar Dec 16 '24 15:12 jayfoad

Its showing the expected output.

ADITI-MISHRA310 avatar Jul 29 '25 23:07 ADITI-MISHRA310

I can no longer reproduce it.

jayfoad avatar Jul 30 '25 08:07 jayfoad