Support for multiple WSL distros and using a wslgit default distro #129
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.