Merge branch 'pt/git4win-mods' into pu
authorPat Thoyts <patthoyts@users.sourceforge.net>
Mon, 3 Oct 2016 22:30:32 +0000 (23:30 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Mon, 3 Oct 2016 22:30:32 +0000 (23:30 +0100)
1  2 
git-gui.sh
diff --combined git-gui.sh
index 1ed51857e9122707467c8ebe09f30c8aa82fed6e,2381c3e54807ecd0b326d8c11b3f0c6008c5636a..b097c8c9271115f5408c98411e588477985c5edb
@@@ -275,6 -275,10 +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
@@@ -1616,13 -1620,11 +1620,13 @@@ proc run_prepare_commit_msg_hook {} 
        if {[file isfile [gitdir MERGE_MSG]]} {
                set pcm_source "merge"
                set fd_mm [open [gitdir MERGE_MSG] r]
 +              fconfigure $fd_mm -encoding utf-8
                puts -nonewline $fd_pcm [read $fd_mm]
                close $fd_mm
        } elseif {[file isfile [gitdir SQUASH_MSG]]} {
                set pcm_source "squash"
                set fd_sm [open [gitdir SQUASH_MSG] r]
 +              fconfigure $fd_sm -encoding utf-8
                puts -nonewline $fd_pcm [read $fd_sm]
                close $fd_sm
        } else {