Skip to content
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

installer: switch the default PATH option to 'CMD' #102

Merged
merged 1 commit into from
Mar 28, 2016

Conversation

dscho
Copy link
Member

@dscho dscho commented Mar 21, 2016

Many Windows users are very familiar with cmd.exe and not really with
the Bash at all. Requiring them to call Git CMD explicitly just to be
able to use Git for Windows from their favorite command-line is not
really helpful, in particular when the command-line is launched from
within other software.

So let's just switch the default to adding the git.exe (and gitk.exe
and git-gui.exe`) to the PATH.

Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de

Many Windows users are very familiar with `cmd.exe` and not really with
the Bash at all. Requiring them to call `Git CMD` explicitly just to be
able to use Git for Windows from their favorite command-line is not
really helpful, in particular when the command-line is launched from
within other software.

So let's just switch the default to adding the `git.exe` (and gitk.exe
and git-gui.exe`) to the PATH.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho merged commit 63fbcca into git-for-windows:master Mar 28, 2016
@dscho dscho deleted the path-option-cmd branch March 28, 2016 13:21
dscho added a commit that referenced this pull request Mar 29, 2016
Git is now [added to the `PATH` by
default](#102)
(previously, the default was for Git to be available only from Git
Bash/CMD).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@fourpastmidnight
Copy link
Contributor

@dscho: If I understand the intent of this correctly, it's so that when a user opens a Windows Command Prompt (after having installed Git for Windows), they can type git --version, for example, and git would execute and display the version. Presumably, they could then just start using git from the Windows Command Prompt instead of having to use Git Bash which they may be unfamiliar with.

However, looking at the changeset in this PR, the default option selected would also result in Windows command line tools like find and sort being "overridden" by the ones provided with Git for Windows.

Was this the behavior you desired by setting the Cmd option to be the default selection? I would have though the default should be set to Both so that the %PATH% environment variable is at least set such that Git can be executed from either Bash or the Command Prompt, but not override the standard Windows command line utilities.

@fourpastmidnight
Copy link
Contributor

@dscho I think I answered my own question, but correct me if I'm wrong: Because the PATH environment variable is modified such that the Git paths are placed at the end of the variable, the standard Windows utilities will not be overridden.

@fourpastmidnight
Copy link
Contributor

Actually, I completey mis-read the options. BTW, I'm really glad about this change, too.

@dscho
Copy link
Member Author

dscho commented May 7, 2016

Yeah, the Cmd option only adds the cmd/ directory to the PATH, i.e. find is not overridden. CmdTools would do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants