Skip to content

Commit 8f49975

Browse files
committed
gitk: require git >= 2.20
gitk has alternate code paths for early git up to 1.72, and has no defined minimum version. Setting any version > 1.72 as minimum will allow removing those code paths. The recent set of advisories published for git, gitk, and git-gui add updates for v2.43 and later, but Debian has buster withgit 2.20 still available. While Debian would be responsible for backporting any fixes to such an early version, we have no good reason preclude it. So, make 2.20 the minimum required git version. Helped-by: Johannes Sixt <[email protected]> Signed-off-by: Mark Levedahl <[email protected]>
1 parent b7ef407 commit 8f49975

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

gitk

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ exec wish "$0" -- "$@"
99

1010
package require Tk
1111

12+
set MIN_GIT_VERSION 2.20
13+
regexp {^git version ([\d.]*\d)} [exec git version] _ git_version
14+
if {[package vcompare $git_version $MIN_GIT_VERSION] < 0} {
15+
set message "The git executable found is too old.
16+
The minimum required version is $MIN_GIT_VERSION.0.
17+
The version of git found is $git_version."
18+
19+
catch {wm withdraw .}
20+
tk_messageBox \
21+
-icon error \
22+
-type ok \
23+
-title "gitk: fatal error" \
24+
-message $message
25+
exit 1
26+
}
27+
1228
######################################################################
1329
##
1430
## Enabling platform-specific code paths
@@ -12820,8 +12836,6 @@ if {$use_ttk} {
1282012836
setttkstyle
1282112837
}
1282212838
12823-
regexp {^git version ([\d.]*\d)} [exec git version] _ git_version
12824-
1282512839
set show_notes {}
1282612840
if {[package vcompare $git_version "1.6.6.2"] >= 0} {
1282712841
set show_notes "--show-notes"

0 commit comments

Comments
 (0)