Skip to content

Commit c7cab7c

Browse files
patthoytsdscho
authored andcommitted
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 <[email protected]> Signed-off-by: Pat Thoyts <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 07d1223 commit c7cab7c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

git-gui/git-gui.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ proc is_Cygwin {} {
275275
set _iscygwin 0
276276
} else {
277277
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+
}
278282
}
279283
} else {
280284
set _iscygwin 0

0 commit comments

Comments
 (0)