-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add support for using WSL Git for configuration #461
Conversation
Introduce a CreateProcess method on the IEnvironment component. This will serve as a place to consolidate Process object creation that currently exists in multiple places.
Use the new CreateProcess method on the IEnvironment component in the GitProcess class.
Add support for calling back to the Git executable in a Windows Subsystem for Linux (WSL).
Assert.True(process.StartInfo.RedirectStandardError); | ||
Assert.False(process.StartInfo.UseShellExecute); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be overkill, but we might also test that git --exec-path
returns the expected value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot do this easily as we need to be invoked from a WSL distro, with specific environment variables set etc. These tests don't actually start any processes, just check that the Process
object is constructed correctly, and is ready to be .Start()
ed.
|
||
To do this, simply follow the [GCM installation instructions for Linux](../README.md#linux-install-instructions). | ||
|
||
**Note:** In this scenario, because GCM is running as a Linux application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this also mean that GCM won't have a GUI available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The answer here is "it depends". We have GUI options for GCM+Linux. If the user has "gWSL" set up, then Linux GUI apps also work and appear as windows on the Windows host.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the doc changes and left suggestions. But overall this is a great change!
This PR enables GCM to understand values of
GIT_EXEC_PATH
that point to a Windows Subsystem for Linux (WSL) path, for example\\wsl$\ubuntu\usr\libexec\git-core
.This can use useful for scenarios where the user does not want to install Git for Windows or use it's configuration files, but rather use the WSL Git's view of the world.
Also add a piece of documentation that outlines how to correctly configure GCM and WSL.