summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgit-gui.sh8
-rw-r--r--lib/blame.tcl1
-rw-r--r--lib/checkout_op.tcl2
-rw-r--r--lib/commit.tcl6
-rw-r--r--lib/diff.tcl1
-rw-r--r--lib/spellcheck.tcl1
6 files changed, 8 insertions, 11 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 8bb121db4f..e9c2650bcf 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -183,7 +183,9 @@ if {[is_Windows]} {
set command_line [string trim [string range $arg0 1 end]]
lset args 0 "| [sanitize_command_line $command_line 0]"
}
- uplevel 1 real_open $args
+ set fd [real_open {*}$args]
+ fconfigure $fd -eofchar {}
+ return $fd
}
} else {
@@ -607,7 +609,6 @@ proc safe_open_command {cmd {redir {}}} {
} err]} {
error $err
}
- fconfigure $fd -eofchar {}
return $fd
}
@@ -1427,7 +1428,6 @@ proc load_message {file {encoding {}}} {
if {[catch {set fd [safe_open_file $f r]}]} {
return 0
}
- fconfigure $fd -eofchar {}
if {$encoding ne {}} {
fconfigure $fd -encoding $encoding
}
@@ -1484,7 +1484,7 @@ proc run_prepare_commit_msg_hook {} {
ui_status [mc "Calling prepare-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 prepare_commit_msg_hook_wait $fd_ph]
diff --git a/lib/blame.tcl b/lib/blame.tcl
index 9d4d1ac872..63a59fdbb3 100644
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
@@ -483,7 +483,6 @@ method _load {jump} {
} else {
set fd [safe_open_file $path r]
}
- fconfigure $fd -eofchar {}
} else {
if {$do_textconv ne 0} {
set fd [git_read [list cat-file --textconv "$commit:$path"]]
diff --git a/lib/checkout_op.tcl b/lib/checkout_op.tcl
index 987486a4b6..449e89e2bc 100644
--- a/lib/checkout_op.tcl
+++ b/lib/checkout_op.tcl
@@ -462,7 +462,7 @@ If you wanted to be on a branch, create one now starting from 'This Detached Che
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 [cb _postcheckout_wait $fd_ph]
} else {
_update_repo_state $this
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]
}
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
diff --git a/lib/spellcheck.tcl b/lib/spellcheck.tcl
index 538d61c792..634656820d 100644
--- a/lib/spellcheck.tcl
+++ b/lib/spellcheck.tcl
@@ -33,7 +33,6 @@ constructor init {pipe_fd ui_text ui_menu} {
method _connect {pipe_fd} {
fconfigure $pipe_fd \
-encoding utf-8 \
- -eofchar {} \
-translation lf
if {[gets $pipe_fd s_version] <= 0} {