Skip to content

Commit 4774c70

Browse files
mark987ttaylorr
authored andcommitted
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 <[email protected]> Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent dcda716 commit 4774c70

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

git-gui.sh

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -584,24 +584,9 @@ proc git {args} {
584584
proc _open_stdout_stderr {cmd} {
585585
_trace_exec $cmd
586586
if {[catch {
587-
set fd [open [concat [list | ] $cmd] r]
588-
} err]} {
589-
if { [lindex $cmd end] eq {2>@1}
590-
&& $err eq {can not find channel named "1"}
591-
} {
592-
# Older versions of Tcl 8.4 don't have this 2>@1 IO
593-
# redirect operator. Fallback to |& cat for those.
594-
# The command was not actually started, so its safe
595-
# to try to start it a second time.
596-
#
597-
set fd [open [concat \
598-
[list | ] \
599-
[lrange $cmd 0 end-1] \
600-
[list |& cat] \
601-
] r]
602-
} else {
603-
error $err
604-
}
587+
set fd [open [concat [list | ] $cmd] r]
588+
} err]} {
589+
error $err
605590
}
606591
fconfigure $fd -eofchar {}
607592
return $fd

0 commit comments

Comments
 (0)