aboutsummaryrefslogtreecommitdiffstats
path: root/git-gui.sh
diff options
context:
space:
mode:
authorMark Levedahl <mlevedahl@gmail.com>2025-05-21 19:18:46 -0400
committerMark Levedahl <mlevedahl@gmail.com>2025-07-22 12:32:58 -0400
commit07714e220b7ee137f4645ec950383eaaeddf23d5 (patch)
tree445c2e54a8854e262ab73bd0022ab1dc5781195a /git-gui.sh
parent40f54f670a01b6ae4f13e0888796948ddce9104c (diff)
downloadgit-07714e220b7ee137f4645ec950383eaaeddf23d5.tar.gz
git-gui: do not mix -translation binary and -encoding
git-gui has many instances of '-translation binary' and '-encoding $SOMETHING' on the same channel. As eofchar is always null given a prior commit, the net effect of having '-translation binary' in such configuration is only to change how text line endings are handled. For cases where the channel is opened to be consumed via gets, the eol translation is irrelevant because Tcl's gets is documented to recognize any of \n, \r, and \r\n as a line ending. So, keep only the '-encoding $SOMETHING' configuration in these cases, making the configuration more clear. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 07781e7d90..63c2f48f91 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -592,7 +592,7 @@ proc git {args} {
proc git_redir {cmd redir} {
set fd [git_read $cmd $redir]
- fconfigure $fd -translation binary -encoding utf-8
+ fconfigure $fd -encoding utf-8
set result [string trimright [read $fd] "\n"]
close $fd
if {$::_trace} {
@@ -1004,7 +1004,7 @@ proc _parse_config {arr_name args} {
[concat config \
$args \
--null --list]]
- fconfigure $fd_rc -translation binary -encoding utf-8
+ fconfigure $fd_rc -encoding utf-8
set buf [read $fd_rc]
close $fd_rc
}