summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Levedahl <mlevedahl@gmail.com>2023-09-20 17:56:14 -0400
committerTaylor Blau <me@ttaylorr.com>2025-05-23 17:04:23 -0400
commit4774c704d20e50ad710f65756099c3eedbfbe789 (patch)
tree5a5f00257c34bfdff6bae66f1c5838e43488592e
parentdcda716dbc9c90bcac4611bd1076747671ee0906 (diff)
downloadgit-4774c704d20e50ad710f65756099c3eedbfbe789.tar.xz
git-gui: remove Tcl 8.4 workaround on 2>@1 redirection
Since b792230 ("git-gui: Show a progress meter for checking out files", 2007-07-08), git-gui includes a workaround for Tcl that does not support using 2>@1 to redirect stderr to stdout. Tcl added such support in 8.4.7, released in 2004, and this is fully supported in all 8.5 releases. As git-gui has a hard-coded requirement for Tcl >= 8.5, the workaround is no longer needed. Delete it. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Taylor Blau <me@ttaylorr.com>
-rwxr-xr-xgit-gui.sh21
1 files changed, 3 insertions, 18 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 3e5907a460..ca1362aa19 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -584,24 +584,9 @@ proc git {args} {
proc _open_stdout_stderr {cmd} {
_trace_exec $cmd
if {[catch {
- set fd [open [concat [list | ] $cmd] r]
- } err]} {
- if { [lindex $cmd end] eq {2>@1}
- && $err eq {can not find channel named "1"}
- } {
- # Older versions of Tcl 8.4 don't have this 2>@1 IO
- # redirect operator. Fallback to |& cat for those.
- # The command was not actually started, so its safe
- # to try to start it a second time.
- #
- set fd [open [concat \
- [list | ] \
- [lrange $cmd 0 end-1] \
- [list |& cat] \
- ] r]
- } else {
- error $err
- }
+ set fd [open [concat [list | ] $cmd] r]
+ } err]} {
+ error $err
}
fconfigure $fd -eofchar {}
return $fd