summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2016-10-02 11:51:29 +0100
committerPat Thoyts <patthoyts@users.sourceforge.net>2016-10-03 11:03:29 +0100
commit577c7e8fc663bc0e31b10e8691f03c3361dedc51 (patch)
treeb6c4cc6acf8322c2eb818723a5d28e9b18f68e63
parent82b2cab317863eb6322386157f73b0e021b72ba2 (diff)
downloadgit-577c7e8fc663bc0e31b10e8691f03c3361dedc51.tar.gz
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>
-rwxr-xr-xgit-gui.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 11048c7a0e..2381c3e548 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -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