diff options
| author | Mark Levedahl <mlevedahl@gmail.com> | 2025-05-21 17:38:10 -0400 |
|---|---|---|
| committer | Mark Levedahl <mlevedahl@gmail.com> | 2025-07-22 12:32:58 -0400 |
| commit | 847c8a2ec4e9504fd112be263c261f2ea2690444 (patch) | |
| tree | 6617769def39108b6c7336ab70097c5895b93dbf /lib/commit.tcl | |
| parent | Merge branch 'ml/abandon-old-versions' (diff) | |
| download | git-847c8a2ec4e9504fd112be263c261f2ea2690444.tar.gz git-847c8a2ec4e9504fd112be263c261f2ea2690444.zip | |
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 <mlevedahl@gmail.com>
Diffstat (limited to 'lib/commit.tcl')
| -rw-r--r-- | lib/commit.tcl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/commit.tcl b/lib/commit.tcl index 2fd57a51fb..d6313e568b 100644 --- a/lib/commit.tcl +++ b/lib/commit.tcl @@ -252,7 +252,7 @@ A good commit message has the following format: ui_status [mc "Calling pre-commit hook..."] set pch_error {} - fconfigure $fd_ph -blocking 0 -translation binary -eofchar {} + fconfigure $fd_ph -blocking 0 -translation binary fileevent $fd_ph readable \ [list commit_prehook_wait $fd_ph $curHEAD $msg_p] } @@ -307,7 +307,7 @@ Do you really want to proceed with your Commit?"] ui_status [mc "Calling commit-msg hook..."] set pch_error {} - fconfigure $fd_ph -blocking 0 -translation binary -eofchar {} + fconfigure $fd_ph -blocking 0 -translation binary fileevent $fd_ph readable \ [list commit_commitmsg_wait $fd_ph $curHEAD $msg_p] } @@ -460,7 +460,7 @@ A rescan will be automatically started now. if {$fd_ph ne {}} { global pch_error set pch_error {} - fconfigure $fd_ph -blocking 0 -translation binary -eofchar {} + fconfigure $fd_ph -blocking 0 -translation binary fileevent $fd_ph readable \ [list commit_postcommit_wait $fd_ph $cmt_id] } |
