I use WSL2 for my main distro, but unfortunately I still have to do some stuff in the windows filesystem. So I set up a WSL1 running Alpine Linux and used git from within there. But my git GUI (Fork) was still using git from WSL2.
I then figured that it must be possible for wslgit to know if working in the windows filesystem or if working in a WSL2 filesystem and use the appropriate WSL distribution. It turns out that it was quite simple to detect when accessing files in a WSL filesystem using the UNC path and also to know which distribution must be used to access those files (solving #127?), and for all other paths use the default WSL distribution or a custom "wslgit" default distribution.
I use WSL2 for my main distro, but unfortunately I still have to do some stuff in the windows filesystem. So I set up a WSL1 running Alpine Linux and used git from within there. But my git GUI (Fork) was still using git from WSL2.
I then figured that it must be possible for wslgit to know if working in the windows filesystem or if working in a WSL2 filesystem and use the appropriate WSL distribution. It turns out that it was quite simple to detect when accessing files in a WSL filesystem using the UNC path and also to know which distribution must be used to access those files (solving #127?), and for all other paths use the default WSL distribution or a custom "wslgit" default distribution.