git-gui: fix detection of Cygwin
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>
Pat Thoyts committed
Oct 2, 2016 at 11:51 UTC
577c7e8fc663bc0e31b10e8691f03c3361dedc51
1 file changed
+4
git-gui.sh
+4
@@ -275,6 +275,10 @@ proc is_Cygwin {} {
275
set _iscygwin 0
276
} else {
277
set _iscygwin 1
278
+ # Handle MSys2 which is only cygwin when MSYSTEM is MSYS.
279
+ if {[info exists ::env(MSYSTEM)] && $::env(MSYSTEM) ne "MSYS"} {
280
+ set _iscygwin 0
281
+ }
282
}
283
} else {
284
set _iscygwin 0