diff options
| author | Johannes Sixt <j6t@kdbg.org> | 2025-05-03 13:11:21 +0200 |
|---|---|---|
| committer | Taylor Blau <me@ttaylorr.com> | 2025-05-23 17:04:23 -0400 |
| commit | aa42e87ef4ee9d84bd2fdb5e56de2ac2b61575d9 (patch) | |
| tree | 62b65e65745bbdb838eb08279d9b7d7db9b0e4ea /lib | |
| parent | git-gui: remove option --stderr from git_read (diff) | |
| download | git-aa42e87ef4ee9d84bd2fdb5e56de2ac2b61575d9.tar.gz git-aa42e87ef4ee9d84bd2fdb5e56de2ac2b61575d9.zip | |
git-gui: break out a separate function git_read_nice
There are two callers of git_read that request special treatment using
option --nice. Rewrite them to call a new function git_read_nice that
does the special treatment. Now we can remove all option treatment from
git_read.
git_write has the same capability, but there are no callers that
request --nice. Remove the feature without substitution.
This is a preparation for a later change where we want to make git_read
and friends non-variadic. Then it cannot have optional arguments.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/blame.tcl | 2 | ||||
| -rw-r--r-- | lib/diff.tcl | 2 |
2 files changed, 2 insertions, 2 deletions
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]] |
