-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
mingw: delete call to ShellExecute for opening help. #793
Conversation
The Windows flavor of git calls ShellExecute to view web pages. This call launches the default handler for .html files. The user is not able to configure an alternative despite git having full support for doing so on Windows. The original request for this change dates back to 12-May-2014, and refers to dropping commit 4804aab from the msysgit repository. This is exactly what this commit does.
What about the path translation concerns mentioned in the message of the reverted commit? I do not find any discussion of that in this commit's message, let alone anything that would reassure me that this commit does not break anything... |
Fair question. The path translation was only necessary for executing ShellExecuteA, so I removed it. I have seen other commit messages against master that indicate the code has handling for path issues, so I assumed it was unnecessary. What is the best way to increase our confidence for this change?
minor The code translates up to MAX_PATH, which can now be disabled in recent versions of Windows 10. The issues do not go away, but the code will not handle this new case either. |
The commit that you revert in this PR claimed that it fixed path conversion issues. That makes me believe that reverting the commit would reintroduce those path conversion issues. I could imagine that there was a discussion on the msysgit mailing list, leading to the original commit. Maybe in this discussion some concrete path conversion issues were mentioned, and maybe those issues were only issues with MSys but are no longer a problem with MSYS2. There are a lot of "maybe"s here... |
Re-reading the commit message of the original commit:
From this sentence, I imagine that this patch might actually not have been triggered by a reported problem, but simply by some distaste for the MSYS bash. Maybe you can dig into the msysgit mailing list around that time frame? |
Sounds good. I'll dig into this more, and report back my findings. |
Thank you so much. You are a big help! |
I looked into this more, and I was not able to find much. I searched the msysgit mailing list, and I cannot find any discussion related to this patch. When I searched across the web for any discussion related to the patch (+/- six months) I get zero results. The search hits for the msysgit mailing list that I reviewed were all tangential to the original issue, and did not help me to better understand the motivation for the patch. I agree with you. It appears the that the original motivation was a desire to avoid shelling out as opposed to a reported issue. I investigated the commits by the original author that happened around the time of the commit in question. The author was implementing an installation that could be moved to different directories without the need to recompile. The author added support for resolving paths relative to exec-dir and htmldir. I speculate that he was in the area, so he implemented the ShellExecute change. The author's change previous to this was seven months prior, and was unrelated. I searched commits previous to the one in question for anything related to path translation, and I did not find anything of interest. (I did not dig that deep. I searched commit logs.) The majority of mentions that I found were for git-gui. |
I vaguely remember that there was a discussion about not being able to override the web browser, and some people claiming that Windows users would not want to use the config method anyway. However, I think that your patch is a strict improvement because it does support the config way, while keeping the previous behavior for users who did not configure a different web browser in their config. Thanks! |
When launching `git help <command>`, the `help.browser` config setting [is now respected](git-for-windows/git#793). Signed-off-by: Johannes Schindelin <[email protected]>
mingw: delete call to ShellExecute for opening help.
mingw: delete call to ShellExecute for opening help.
mingw: delete call to ShellExecute for opening help.
mingw: delete call to ShellExecute for opening help.
mingw: delete call to ShellExecute for opening help.
mingw: delete call to ShellExecute for opening help.
mingw: delete call to ShellExecute for opening help.
mingw: delete call to ShellExecute for opening help.
mingw: delete call to ShellExecute for opening help.
mingw: delete call to ShellExecute for opening help.
mingw: delete call to ShellExecute for opening help.
mingw: delete call to ShellExecute for opening help.
mingw: delete call to ShellExecute for opening help.
mingw: delete call to ShellExecute for opening help.
The Windows flavor of git calls ShellExecute to view web pages. This call
launches the default handler for .html files. The user is not able to
configure an alternative despite git having full support for doing so on
Windows.
The original request for this change dates back to 12-May-2014, and refers
to dropping commit 4804aab from the msysgit repository. This is exactly
what this commit does.