-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
warning about commondir on ripgrep over git repo with submodules #1520
Copy link
Copy link
Closed
Labels
bugA bug.A bug.
Description
What version of ripgrep are you using?
$ rg --version
ripgrep 12.0.0
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)
Also,
$ git --version
git version 2.25.1
How did you install ripgrep?
Homebrew
What operating system are you using ripgrep on?
macOS. Also seems to occur on Linux.
Describe your question, feature request, or bug.
When running ripgrep on a git clone with submodules, it prints the following error:
$ rg -i foobar
../../../../.git/modules/path/to/submodule/commondir: No such file or directory (os error 2)
I suspect this is related to #1446
If this is a bug, what are the steps to reproduce the behavior?
git init foo
git init bar
cd foo
touch file
git add file
git commit -m 'initial commit'
cd ../bar
touch file
git add file
git commit -m 'initial commit'
git submodule add ../foo path
rg string
If this is a bug, what is the actual behavior?
The ripgrep invocation will print
../.git/modules/path/commondir: No such file or directory (os error 2)
If this is a bug, what is the expected behavior?
No warnings. Never warnings.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugA bug.A bug.