git-gui (Windows): use git-bash.exe if it is available
authorThomas Klaeger <thklaeger@gmail.com>
Thu, 26 Sep 2019 17:46:19 +0000 (10:46 -0700)
committerPratyush Yadav <me@yadavpratyush.com>
Tue, 1 Oct 2019 13:40:34 +0000 (19:10 +0530)
commit6a72d44fc274db71f9b7350a2977a27cf13ca550
tree32f5f3637ffd58c4b1fc132d07246c8af614d2e0
parent60c60b627e81bf84e1cb01729d2ae882178f079d
git-gui (Windows): use git-bash.exe if it is available

Git for Windows 2.x ships with an executable that starts the Git Bash
with all the environment variables and what not properly set up. It is
also adjusted according to the Terminal emulator option chosen when
installing Git for Windows (while `bash.exe --login -i` would always
launch with Windows' default console).

So let's use that executable (usually C:\Program Files\Git\git-bash.exe)
instead of `bash.exe --login -i` if its presence was detected.

This fixes https://github.com/git-for-windows/git/issues/490

Signed-off-by: Thomas Kläger <thomas.klaeger@10a.ch>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
git-gui.sh