git-gui: handle the encoding of Git's output correctly
commitae75e1e432b40a8de8e131888951a831ecef8915
authorKarsten Blees <blees@dcon.de>
Thu, 26 Feb 2015 09:19:45 +0000 (26 17:19 +0800)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Thu, 6 Oct 2016 08:23:21 +0000 (6 09:23 +0100)
tree87bbfef57090228b022ba06e56fd4b0f6a8bd3e1
parente2039e946e6efa6c220b3cf186671f93e7aec9b9
git-gui: handle the encoding of Git's output correctly

If we use 'eval exec $opt $cmdp $args' to execute git command,
tcl engine will convert the output of the git comand with the rule
system default code page to unicode.

But cp936 -> unicode conversion implicitly done by exec is not reversible.
So we have to use git_read instead.

Bug report and an original reproducer by Cloud Chou:
https://github.com/msysgit/git/issues/302

Cloud Chou find the reason of the bug.

Thanks-to: Johannes Schindelin <johannes.schindelin@gmx.de>
Thanks-to: Pat Thoyts <patthoyts@users.sourceforge.net>
Reported-by: Cloud Chou <515312382@qq.com>
Original-test-by: Cloud Chou <515312382@qq.com>
Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Cloud Chou <515312382@qq.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui.sh