Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Git Bash shortcut causes side-effects for other program's icons #71
On Windows 8 x64, the shortcut target that Setup creates to Git Bash is as follows:
C:\Windows\SysWOW64\cmd.exe /c ""C:\Program Files (x86)\Git\bin\sh.exe" --login -i"
This shortcut is also set to have its icon point to git.ico.
Having a shortcut whose executable is cmd.exe and whose icon is git.ico as side-effects of making this icon appear in some other circumstances when cmd.exe runs. For example, doing Start without Debugging (Ctrl+F5) in Visual Studio 2012 internally uses cmd.exe to run MyProgram.exe & pause; such windows show up with git.ico.
If instead the Git Bash shortcut uses this target, other cmd.exe windows are not affected:
"C:\Program Files (x86)\Git\bin\sh.exe" --login -I
(Creating issue from mailing list discussion at https://groups.google.com/forum/#!topic/msysgit/raMI2zbKkq0)
I've confirmed that changing the line in share/WinGit/install.iss under [Icons] from:
works on Windows 8.
Now I'll see if I can figure out how to submit a pull request...
I wasn't able to reproduce your issue exactly. On my Win 7 x64 machine I do not see that a VS "start without debugging" window has the same icon as a Git Bash window. However, they get grouped into the same taskbar group, probably because they were started by the same process. But if I expand the taskbar group, I see that the two windows have different icons. Is it that what you see, too?
I think that’s slightly different from the Win 8 behavior I recall seeing. I’ll have to double-check once I get back to a machine With VS installed, but I believe what I saw on Windows 8 was a cmd window showing up with the Git Bash icon. (I wasn’t running Git Bash at all at the time.)
It sounds like it’s a slightly different (though related) side-effect on Windows 7. If you change the shortcut to Git Bash in the start menu to remove the cmd.exe wrapper, does that prevent the windows from getting put together in the same taskbar group?