andy-5 / wslgit

Use Git installed in Bash on Windows/Windows Subsystem for Linux (WSL) from Windows and Visual Studio Code (VSCode)
MIT License
1.18k stars 59 forks source link

Not working with VS Code #68

Closed dawsonc623 closed 5 years ago

dawsonc623 commented 5 years ago

I am using VS Code version 1.32.3 (user setup). When I let VS Code use my Windows Git, it works fine, but when setting it to use wslgit, I get "No source control providers registered" in my Source Control tab, and this in my Git output:

Looking for git in: C:\Users\...\wslgit.exe
Using git 2.17.1 from C:\Users\...\wslgit.exe
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel
> git rev-parse --show-toplevel

Obviously, VS Code is detecting wslgit fine, but as far as using it goes nothing is happening.

andy-5 commented 5 years ago

What is the output of manually executing C:\Users\...\wslgit.exe rev-parse --show-toplevel within a Git repository on the Windows command line?

Have you made any customizations to your WSL environment, like e.g. custom mount points, using a different shell, etc.?

dawsonc623 commented 5 years ago

Ah, got it - the VC++ runtime needed repaired. It would have been great if VS Code had shown me the error, but I suppose I should have tried running it manually anyway.

Thanks for pointing me in the right direction, and thanks for creating this to begin with!