Skip to content

warning about commondir on ripgrep over git repo with submodules #1520

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

Closed
Roguelazer opened this issue Mar 16, 2020 · 4 comments
Closed

warning about commondir on ripgrep over git repo with submodules #1520

Roguelazer opened this issue Mar 16, 2020 · 4 comments
Labels
bug A bug.

Comments

@Roguelazer
Copy link

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.

@BurntSushi
Copy link
Owner

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.

@BurntSushi BurntSushi added the bug A bug. label Mar 16, 2020
BurntSushi added a commit that referenced this issue Mar 16, 2020
This fixes fallout from fixing #1520.
@joshuarubin
Copy link

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

@BurntSushi
Copy link
Owner

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

@BurntSushi
Copy link
Owner

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

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

No branches or pull requests

3 participants