From 6eb420ef61317b2efa2993868a6302afed6ae60a Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Tue, 17 Jul 2007 01:50:10 -0400 Subject: git-gui: Always disable the Tcl EOF character when reading On Windows (which includes Cygwin) Tcl defaults to leaving the EOF character of input file streams set to the ASCII EOF character, but if that character were to appear in the data stream then Tcl will close the channel early. So we have to disable eofchar on Windows. Since the default is disabled on all platforms except Windows, we can just disable it everywhere to prevent any sort of read problem. Signed-off-by: Shawn O. Pearce --- lib/commit.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/commit.tcl') diff --git a/lib/commit.tcl b/lib/commit.tcl index 46a78c158f..0f3b16dfeb 100644 --- a/lib/commit.tcl +++ b/lib/commit.tcl @@ -209,7 +209,7 @@ A good commit message has the following format: ui_status {Calling pre-commit hook...} set pch_error {} set fd_ph [open "| $pchook" r] - fconfigure $fd_ph -blocking 0 -translation binary + fconfigure $fd_ph -blocking 0 -translation binary -eofchar {} fileevent $fd_ph readable \ [list commit_prehook_wait $fd_ph $curHEAD $msg] } -- cgit v1.3