git-gui: git-diff knows submodules and textconv

git-gui's diff functions avoid using textconv filters on git < 1.6.1, or asking about submodules on version before 1.7.2, but git-gui requires git >= v2.36. So, remove this now obsolete code. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>

Mark Levedahl committed Feb 13, 2024 at 00:11 UTC 940640de8bf219b9cb17e1ee670baa170e0e75c6
1 file changed +3 -16
lib/diff.tcl
+3 -16
@@ -280,9 +280,7 @@ proc start_show_diff {cont_info {add_opts {}}} {
280 if {$w eq $ui_index} {
281 lappend cmd diff-index
282 lappend cmd --cached
283 - if {[git-version >= "1.7.2"]} {
284 - lappend cmd --ignore-submodules=dirty
285 - }
283 + lappend cmd --ignore-submodules=dirty
284 } elseif {$w eq $ui_workdir} {
285 if {[string first {U} $m] >= 0} {
286 lappend cmd diff
@@ -290,17 +288,14 @@ proc start_show_diff {cont_info {add_opts {}}} {
288 lappend cmd diff-files
289 }
290 }
293 - if {![is_config_false gui.textconv] && [git-version >= 1.6.1]} {
291 + if {![is_config_false gui.textconv]} {
292 lappend cmd --textconv
293 }
294
295 if {[string match {160000 *} [lindex $s 2]]
296 || [string match {160000 *} [lindex $s 3]]} {
297 set is_submodule_diff 1
300 -
301 - if {[git-version >= "1.6.6"]} {
302 - lappend cmd --submodule
303 - }
298 + lappend cmd --submodule
299 }
300
301 lappend cmd -p
@@ -319,14 +314,6 @@ proc start_show_diff {cont_info {add_opts {}}} {
314 lappend cmd $path
315 }
316
322 - if {$is_submodule_diff && [git-version < "1.6.6"]} {
323 - if {$w eq $ui_index} {
324 - set cmd [list submodule summary --cached -- $path]
325 - } else {
326 - set cmd [list submodule summary --files -- $path]
327 - }
328 - }
329 -
317 if {[catch {set fd [git_read_nice $cmd]} err]} {
318 set diff_active 0
319 unlock_index