hangxingliu / wslgit

:candy: Use Git installed in WSL(Windows Subsystem for Linux) from Windows and Visual Studio Code
GNU General Public License v3.0
150 stars 18 forks source link

Add support for 9p mounts in WSL2 #15

Open rennex opened 5 years ago

rennex commented 5 years ago

I upgraded to WSL2 and this stopped working. By making the script accept mounts of type 9p in addition to drvfs, I got it to work easily.

WSL2 also mounts tools on /init type 9p, so the script thought TO is a drive letter. I added a check for : as the second character.

Unfortunately, this doesn't work yet with repos that reside on the Linux disk. Their paths would be simpler to convert: /home/x/repo/ in Linux is e.g. \\wsl$\Ubuntu\home\x\repo\ in Windows. However, running a .bat script in a UNC path prints a warning (and it's only possible to run it in PowerShell). I'm not sure if that can be fixed.

Stanzilla commented 4 years ago

@hangxingliu hey there, any plans to get this is in?

@rennex you could use the wslpath utility for that, afaik