diff --git a/git-gui.sh b/git-gui.sh index 408149b530..bbdbd35d26 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -642,11 +642,11 @@ proc safe_open_command {cmd {redir {}}} { return $fd } -proc git_read {cmd} { +proc git_read {cmd {redir {}}} { set cmdp [_git_cmd [lindex $cmd 0]] set cmd [lrange $cmd 1 end] - return [safe_open_command [concat $cmdp $cmd]] + return [safe_open_command [concat $cmdp $cmd] $redir] } proc git_read_nice {cmd} { @@ -669,7 +669,7 @@ proc git_write {cmd} { } proc githook_read {hook_name args} { - git_read [concat [list hook run --ignore-missing $hook_name --] $args 2>@1] + git_read [concat [list hook run --ignore-missing $hook_name --] $args] [list 2>@1] } proc kill_file_process {fd} { diff --git a/lib/checkout_op.tcl b/lib/checkout_op.tcl index 48fd1a3cac..87ed0b4858 100644 --- a/lib/checkout_op.tcl +++ b/lib/checkout_op.tcl @@ -352,8 +352,8 @@ method _readtree {} { --exclude-per-directory=.gitignore \ $HEAD \ $new_hash \ - 2>@1 \ - ]] + ] \ + [list 2>@1]] fconfigure $fd -blocking 0 -translation binary fileevent $fd readable [cb _readtree_wait $fd $status_bar_operation] } diff --git a/lib/choose_repository.tcl b/lib/choose_repository.tcl index 7b64a11239..5b361cc424 100644 --- a/lib/choose_repository.tcl +++ b/lib/choose_repository.tcl @@ -959,8 +959,8 @@ method _do_clone_checkout {HEAD} { -v \ HEAD \ HEAD \ - 2>@1 \ - ]] + ] \ + [list 2>@1]] fconfigure $fd -blocking 0 -translation binary fileevent $fd readable [cb _readtree_wait $fd] } diff --git a/lib/console.tcl b/lib/console.tcl index cc416d4811..4715ce91e6 100644 --- a/lib/console.tcl +++ b/lib/console.tcl @@ -92,8 +92,7 @@ method _init {} { method exec {cmd {after {}}} { if {[lindex $cmd 0] eq {git}} { - lappend cmd 2>@1 - set fd_f [git_read [lrange $cmd 1 end]] + set fd_f [git_read [lrange $cmd 1 end] [list 2>@1]] } else { set fd_f [safe_open_command $cmd [list 2>@1]] } diff --git a/lib/merge.tcl b/lib/merge.tcl index 6317c32127..55b4fc5ed3 100644 --- a/lib/merge.tcl +++ b/lib/merge.tcl @@ -239,7 +239,7 @@ Continue with resetting the current changes?"] } if {[ask_popup $op_question] eq {yes}} { - set fd [git_read [list read-tree --reset -u -v HEAD 2>@1]] + set fd [git_read [list read-tree --reset -u -v HEAD] [list 2>@1]] fconfigure $fd -blocking 0 -translation binary set status_bar_operation [$::main_status \ start \