Ripgrep: warning about commondir on ripgrep over git repo with submodules

Created on 16 Mar 2020  路  4Comments  路  Source: BurntSushi/ripgrep

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.

bug

Most helpful comment

I've released ripgrep 12.0.1 with a fix for this.

All 4 comments

Oof, sorry. You're right. This is a regression.

I will put out a new release soonish. I'll give it a few days in case any other regressions pop up.

Any chance you could cut a release now? This issue is driving me batty!

I'd recommend just building from source if it's that bad. Otherwise: https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#release

I've released ripgrep 12.0.1 with a fix for this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

crumblingstatue picture crumblingstatue  路  3Comments

kenorb picture kenorb  路  3Comments

fcantournet picture fcantournet  路  3Comments

timotheecour picture timotheecour  路  3Comments

Offpics picture Offpics  路  3Comments