git-gui: add menu item to launch a bash shell on Windows.
authorPat Thoyts <patthoyts@users.sourceforge.net>
Thu, 12 Sep 2013 20:15:19 +0000 (21:15 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Thu, 12 Sep 2013 20:15:19 +0000 (21:15 +0100)
When using git-gui as the primary git application on Windows it can be
awkward obtaining a suitable shell. This commit adds a menu item to the
Repository menu that launches the bash shell provided with the git
installation on Windows.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui.sh
index 66db995ed0edffcdc1e71fa2de354d59527c0c64..db46ac50bfb74c8a3252e303869557581309b505 100755 (executable)
@@ -2665,6 +2665,16 @@ if {![is_bare]} {
        .mbar.repository add command \
                -label [mc "Explore Working Copy"] \
                -command {do_explore}
+}
+
+if {[is_Windows]} {
+       .mbar.repository add command \
+               -label [mc "Git Bash"] \
+               -command {eval exec [auto_execok start] \
+                                         [list "Git Bash" bash --login -l &]}
+}
+
+if {[is_Windows] || ![is_bare]} {
        .mbar.repository add separator
 }