From: Pat Thoyts Date: Mon, 3 Oct 2016 22:30:32 +0000 (+0100) Subject: Merge branch 'pt/git4win-mods' into pu X-Git-Tag: gitgui-0.21.0~8 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c7fb7bfa114323a6608a0f40aeee453b66406287?ds=inline;hp=-c Merge branch 'pt/git4win-mods' into pu --- c7fb7bfa114323a6608a0f40aeee453b66406287 diff --combined git-gui.sh index 1ed51857e9,2381c3e548..b097c8c927 --- a/git-gui.sh +++ b/git-gui.sh @@@ -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 {