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>
Mark Levedahl committed
Sep 20, 2023 at 17:56 UTC
4774c704d20e50ad710f65756099c3eedbfbe789
1 file changed
+3
-18
git-gui.sh
+3
-18
@@ -584,24 +584,9 @@ proc git {args} {
584
proc _open_stdout_stderr {cmd} {
585
_trace_exec $cmd
586
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
590
}
591
fconfigure $fd -eofchar {}
592
return $fd