]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-gui: translation binary defines iso8859-1
authorMark Levedahl <mlevedahl@gmail.com>
Thu, 22 May 2025 17:17:08 +0000 (13:17 -0400)
committerMark Levedahl <mlevedahl@gmail.com>
Tue, 22 Jul 2025 16:32:58 +0000 (12:32 -0400)
git-gui has many cases where -translation binary and -encoding binary
are configured on the same channel. But, -translation binary defines a
binary channel, which sets up -encoding iso8859-1 as part of its work.
Tcl 8.x defines -encoding binary as an alias of -encoding iso8859-1, and
this alias is deleted in Tcl 9.0.  Let's delete the redundant encoding
definition now.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
git-gui.sh
lib/blame.tcl
lib/index.tcl
lib/mergetool.tcl

index e9c2650bcf756f12e314d7358eeae2f8c72e38b9..07781e7d908f80549916b78a903052110b9391b7 100755 (executable)
@@ -1406,15 +1406,15 @@ proc rescan_stage2 {fd after} {
        set fd_di [git_read [list diff-index --cached --ignore-submodules=dirty -z [PARENT]]]
        set fd_df [git_read [list diff-files -z]]
 
-       fconfigure $fd_di -blocking 0 -translation binary -encoding binary
-       fconfigure $fd_df -blocking 0 -translation binary -encoding binary
+       fconfigure $fd_di -blocking 0 -translation binary
+       fconfigure $fd_df -blocking 0 -translation binary
 
        fileevent $fd_di readable [list read_diff_index $fd_di $after]
        fileevent $fd_df readable [list read_diff_files $fd_df $after]
 
        if {[is_config_true gui.displayuntracked]} {
                set fd_lo [git_read [concat ls-files --others -z $ls_others]]
-               fconfigure $fd_lo -blocking 0 -translation binary -encoding binary
+               fconfigure $fd_lo -blocking 0 -translation binary
                fileevent $fd_lo readable [list read_ls_others $fd_lo $after]
                incr rescan_active
        }
index 63a59fdbb348ca46042c2404e462d640437106c1..e51a820b128499c1a17d203bcf9ea43e3c4bf7b8 100644 (file)
@@ -1142,7 +1142,6 @@ method _blameparent {} {
 
                fconfigure $fd \
                        -blocking 0 \
-                       -encoding binary \
                        -translation binary
                fileevent $fd readable [cb _read_diff_load_commit \
                        $fd $cparent $new_path $r_orig_line]
index 377547034b7d49dfa013c8d63e81e3fbc282eace..7aa09c7728267e7f004688796f11f5e66a15708c 100644 (file)
@@ -78,7 +78,6 @@ proc update_indexinfo {msg path_list after} {
                -blocking 0 \
                -buffering full \
                -buffersize 512 \
-               -encoding binary \
                -translation binary
        fileevent $fd writable [list \
                write_update_indexinfo \
@@ -147,7 +146,6 @@ proc update_index {msg path_list after} {
                -blocking 0 \
                -buffering full \
                -buffersize 512 \
-               -encoding binary \
                -translation binary
        fileevent $fd writable [list \
                write_update_index \
@@ -227,7 +225,6 @@ proc checkout_index {msg path_list after capture_error} {
                -blocking 0 \
                -buffering full \
                -buffersize 512 \
-               -encoding binary \
                -translation binary
        fileevent $fd writable [list \
                write_checkout_index \
index 2c9bb3af403fe4d3bfb447828a53bec61e5a5339..44be4ed3ffa59745f1a824f2aaf24d0d867cbfe0 100644 (file)
@@ -90,7 +90,7 @@ proc merge_load_stages {path cont} {
 
        set merge_stages_fd [git_read [list ls-files -u -z -- $path]]
 
-       fconfigure $merge_stages_fd -blocking 0 -translation binary -encoding binary
+       fconfigure $merge_stages_fd -blocking 0 -translation binary
        fileevent $merge_stages_fd readable [list read_merge_stages $merge_stages_fd $cont]
 }
 
@@ -370,7 +370,7 @@ proc merge_tool_start {cmdline target backup stages} {
 
        ui_status [mc "Running merge tool..."]
 
-       fconfigure $mtool_fd -blocking 0 -translation binary -encoding binary
+       fconfigure $mtool_fd -blocking 0 -translation binary
        fileevent $mtool_fd readable [list read_mtool_output $mtool_fd]
 }