Skip to content

Commit f6d3ee2

Browse files
committed
git-gui: translation binary defines iso8859-1
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 <[email protected]>
1 parent 847c8a2 commit f6d3ee2

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

git-gui.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,15 +1406,15 @@ proc rescan_stage2 {fd after} {
14061406
set fd_di [git_read [list diff-index --cached --ignore-submodules=dirty -z [PARENT]]]
14071407
set fd_df [git_read [list diff-files -z]]
14081408

1409-
fconfigure $fd_di -blocking 0 -translation binary -encoding binary
1410-
fconfigure $fd_df -blocking 0 -translation binary -encoding binary
1409+
fconfigure $fd_di -blocking 0 -translation binary
1410+
fconfigure $fd_df -blocking 0 -translation binary
14111411

14121412
fileevent $fd_di readable [list read_diff_index $fd_di $after]
14131413
fileevent $fd_df readable [list read_diff_files $fd_df $after]
14141414

14151415
if {[is_config_true gui.displayuntracked]} {
14161416
set fd_lo [git_read [concat ls-files --others -z $ls_others]]
1417-
fconfigure $fd_lo -blocking 0 -translation binary -encoding binary
1417+
fconfigure $fd_lo -blocking 0 -translation binary
14181418
fileevent $fd_lo readable [list read_ls_others $fd_lo $after]
14191419
incr rescan_active
14201420
}

lib/blame.tcl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,6 @@ method _blameparent {} {
11421142

11431143
fconfigure $fd \
11441144
-blocking 0 \
1145-
-encoding binary \
11461145
-translation binary
11471146
fileevent $fd readable [cb _read_diff_load_commit \
11481147
$fd $cparent $new_path $r_orig_line]

lib/index.tcl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ proc update_indexinfo {msg path_list after} {
7878
-blocking 0 \
7979
-buffering full \
8080
-buffersize 512 \
81-
-encoding binary \
8281
-translation binary
8382
fileevent $fd writable [list \
8483
write_update_indexinfo \
@@ -147,7 +146,6 @@ proc update_index {msg path_list after} {
147146
-blocking 0 \
148147
-buffering full \
149148
-buffersize 512 \
150-
-encoding binary \
151149
-translation binary
152150
fileevent $fd writable [list \
153151
write_update_index \
@@ -227,7 +225,6 @@ proc checkout_index {msg path_list after capture_error} {
227225
-blocking 0 \
228226
-buffering full \
229227
-buffersize 512 \
230-
-encoding binary \
231228
-translation binary
232229
fileevent $fd writable [list \
233230
write_checkout_index \

lib/mergetool.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ proc merge_load_stages {path cont} {
9090

9191
set merge_stages_fd [git_read [list ls-files -u -z -- $path]]
9292

93-
fconfigure $merge_stages_fd -blocking 0 -translation binary -encoding binary
93+
fconfigure $merge_stages_fd -blocking 0 -translation binary
9494
fileevent $merge_stages_fd readable [list read_merge_stages $merge_stages_fd $cont]
9595
}
9696

@@ -370,7 +370,7 @@ proc merge_tool_start {cmdline target backup stages} {
370370

371371
ui_status [mc "Running merge tool..."]
372372

373-
fconfigure $mtool_fd -blocking 0 -translation binary -encoding binary
373+
fconfigure $mtool_fd -blocking 0 -translation binary
374374
fileevent $mtool_fd readable [list read_mtool_output $mtool_fd]
375375
}
376376

0 commit comments

Comments
 (0)