]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-gui: fix detection of Cygwin
authorPat Thoyts <patthoyts@users.sourceforge.net>
Sun, 2 Oct 2016 10:51:29 +0000 (11:51 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Mon, 3 Oct 2016 10:03:29 +0000 (11:03 +0100)
MSys2 might *look* like Cygwin, but it is *not* Cygwin... Unless it
is run with `MSYSTEM=MSYS`, that is.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui.sh

index 11048c7a0e94f598b168de98d18fda9aea420c7d..2381c3e54807ecd0b326d8c11b3f0c6008c5636a 100755 (executable)
@@ -275,6 +275,10 @@ proc is_Cygwin {} {
                                set _iscygwin 0
                        } else {
                                set _iscygwin 1
+                               # Handle MSys2 which is only cygwin when MSYSTEM is MSYS.
+                               if {[info exists ::env(MSYSTEM)] && $::env(MSYSTEM) ne "MSYS"} {
+                                       set _iscygwin 0
+                               }
                        }
                } else {
                        set _iscygwin 0