Skip to content

Commit 940640d

Browse files
committed
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 <[email protected]>
1 parent e48c822 commit 940640d

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

lib/diff.tcl

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -280,27 +280,22 @@ proc start_show_diff {cont_info {add_opts {}}} {
280280
if {$w eq $ui_index} {
281281
lappend cmd diff-index
282282
lappend cmd --cached
283-
if {[git-version >= "1.7.2"]} {
284-
lappend cmd --ignore-submodules=dirty
285-
}
283+
lappend cmd --ignore-submodules=dirty
286284
} elseif {$w eq $ui_workdir} {
287285
if {[string first {U} $m] >= 0} {
288286
lappend cmd diff
289287
} else {
290288
lappend cmd diff-files
291289
}
292290
}
293-
if {![is_config_false gui.textconv] && [git-version >= 1.6.1]} {
291+
if {![is_config_false gui.textconv]} {
294292
lappend cmd --textconv
295293
}
296294

297295
if {[string match {160000 *} [lindex $s 2]]
298296
|| [string match {160000 *} [lindex $s 3]]} {
299297
set is_submodule_diff 1
300-
301-
if {[git-version >= "1.6.6"]} {
302-
lappend cmd --submodule
303-
}
298+
lappend cmd --submodule
304299
}
305300

306301
lappend cmd -p
@@ -319,14 +314,6 @@ proc start_show_diff {cont_info {add_opts {}}} {
319314
lappend cmd $path
320315
}
321316

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-
330317
if {[catch {set fd [git_read_nice $cmd]} err]} {
331318
set diff_active 0
332319
unlock_index

0 commit comments

Comments
 (0)