aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Levedahl <mlevedahl@gmail.com>2024-02-13 00:11:32 -0500
committerMark Levedahl <mlevedahl@gmail.com>2025-07-18 23:48:06 -0400
commit940640de8bf219b9cb17e1ee670baa170e0e75c6 (patch)
tree80aac97fe06a10fc1498c5fdf865e2fc976a1260
parente48c822012a79cb98ebd1c4907c6ae3081afa4d9 (diff)
downloadgit-940640de8bf219b9cb17e1ee670baa170e0e75c6.tar.gz
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>
-rw-r--r--lib/diff.tcl19
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/diff.tcl b/lib/diff.tcl
index 84f0468c7c..4b21a26acb 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -280,9 +280,7 @@ proc start_show_diff {cont_info {add_opts {}}} {
if {$w eq $ui_index} {
lappend cmd diff-index
lappend cmd --cached
- if {[git-version >= "1.7.2"]} {
- lappend cmd --ignore-submodules=dirty
- }
+ lappend cmd --ignore-submodules=dirty
} elseif {$w eq $ui_workdir} {
if {[string first {U} $m] >= 0} {
lappend cmd diff
@@ -290,17 +288,14 @@ proc start_show_diff {cont_info {add_opts {}}} {
lappend cmd diff-files
}
}
- if {![is_config_false gui.textconv] && [git-version >= 1.6.1]} {
+ if {![is_config_false gui.textconv]} {
lappend cmd --textconv
}
if {[string match {160000 *} [lindex $s 2]]
|| [string match {160000 *} [lindex $s 3]]} {
set is_submodule_diff 1
-
- if {[git-version >= "1.6.6"]} {
- lappend cmd --submodule
- }
+ lappend cmd --submodule
}
lappend cmd -p
@@ -319,14 +314,6 @@ proc start_show_diff {cont_info {add_opts {}}} {
lappend cmd $path
}
- if {$is_submodule_diff && [git-version < "1.6.6"]} {
- if {$w eq $ui_index} {
- set cmd [list submodule summary --cached -- $path]
- } else {
- set cmd [list submodule summary --files -- $path]
- }
- }
-
if {[catch {set fd [git_read_nice $cmd]} err]} {
set diff_active 0
unlock_index