From 847c8a2ec4e9504fd112be263c261f2ea2690444 Mon Sep 17 00:00:00 2001 From: Mark Levedahl Date: Wed, 21 May 2025 17:38:10 -0400 Subject: git-gui: assure -eofchar {} on all channels Per 6eb420ef61 ("git-gui: Always disable the Tcl EOF character when reading", 2007-07-17), git-gui should disable Tcl's EOF character detection on all files when on Windows: the default is disabled on all other platforms (and with Tcl 9.0, is disabled on Windows too). This EOF character is for compatibility with files / applications written for file systems that know only the disc sectors allocated, and not the number of bytes used. This has nothing to do with git. But, git-gui does not set -eofchar {} on all channels. To avoid any further leakage, let's just add this to the Windows specific override of open. This override is needed only as long as Tcl 8.x is in use (Tcl 9.0 makes -eofchar {} default on all platforms). Signed-off-by: Mark Levedahl --- lib/diff.tcl | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/diff.tcl') diff --git a/lib/diff.tcl b/lib/diff.tcl index 1acd37bdb4..65d0997b79 100644 --- a/lib/diff.tcl +++ b/lib/diff.tcl @@ -191,7 +191,6 @@ proc show_other_diff {path w m cont_info} { file { set fd [safe_open_file $path r] fconfigure $fd \ - -eofchar {} \ -encoding [get_path_encoding $path] set content [read $fd $max_sz] close $fd -- cgit v1.2.3