diff options
| -rwxr-xr-x | git-gui.sh | 41 | ||||
| -rw-r--r-- | lib/blame.tcl | 2 | ||||
| -rw-r--r-- | lib/diff.tcl | 2 |
3 files changed, 11 insertions, 34 deletions
diff --git a/git-gui.sh b/git-gui.sh index 890a172fc4..28113220af 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -643,22 +643,16 @@ proc _open_stdout_stderr {cmd} { } proc git_read {args} { - set opt [list] - - while {1} { - switch -- [lindex $args 0] { - --nice { - _lappend_nice opt - } + set cmdp [_git_cmd [lindex $args 0]] + set args [lrange $args 1 end] - default { - break - } + return [_open_stdout_stderr [concat $cmdp $args]] +} - } +proc git_read_nice {args} { + set opt [list] - set args [lrange $args 1 end] - } + _lappend_nice opt set cmdp [_git_cmd [lindex $args 0]] set args [lrange $args 1 end] @@ -667,28 +661,11 @@ proc git_read {args} { } proc git_write {args} { - set opt [list] - - while {1} { - switch -- [lindex $args 0] { - --nice { - _lappend_nice opt - } - - default { - break - } - - } - - set args [lrange $args 1 end] - } - set cmdp [_git_cmd [lindex $args 0]] set args [lrange $args 1 end] - _trace_exec [concat $opt $cmdp $args] - return [open [concat [list | ] $opt $cmdp $args] w] + _trace_exec [concat $cmdp $args] + return [open [concat [list | ] $cmdp $args] w] } proc githook_read {hook_name args} { diff --git a/lib/blame.tcl b/lib/blame.tcl index e70a079fa7..ceb2330266 100644 --- a/lib/blame.tcl +++ b/lib/blame.tcl @@ -617,7 +617,7 @@ method _exec_blame {cur_w cur_d options cur_s} { } lappend options -- $path - set fd [eval git_read --nice blame $options] + set fd [eval git_read_nice blame $options] fconfigure $fd -blocking 0 -translation lf -encoding utf-8 fileevent $fd readable [cb _read_blame $fd $cur_w $cur_d] set current_fd $fd diff --git a/lib/diff.tcl b/lib/diff.tcl index cfa8a414d3..ce1bad6900 100644 --- a/lib/diff.tcl +++ b/lib/diff.tcl @@ -338,7 +338,7 @@ proc start_show_diff {cont_info {add_opts {}}} { } } - if {[catch {set fd [eval git_read --nice $cmd]} err]} { + if {[catch {set fd [eval git_read_nice $cmd]} err]} { set diff_active 0 unlock_index ui_status [mc "Unable to display %s" [escape_path $path]] |
