From aa42e87ef4ee9d84bd2fdb5e56de2ac2b61575d9 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Sat, 3 May 2025 13:11:21 +0200 Subject: 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 Signed-off-by: Taylor Blau --- lib/diff.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/diff.tcl') 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]] -- cgit 1.2.3-korg