Skip to content

Commit 7add5af

Browse files
anderskpaulusmack
authored andcommitted
gitk: Take only numeric version components when computing $git_version
This fixes errors running with release candidate versions of Git: Error in startup script: expected version number but got "1.7.4-rc0" Also, $git_version is no longer artificially limited to three components. That limitation was added by commit 194bbf6 ("gitk: Handle msysGit version during version comparisons") to deal with msysGit version strings like “1.6.4.msysgit.0”, and we don’t need it now. Hence as another side effect, this enables showing notes with git version 1.6.6.2 or 1.6.6.3, as originally intended by commit 7defefb ("gitk: Show notes by default (like git log does"). Signed-off-by: Anders Kaseorg <[email protected]> Reported-by: Mathias Lafeldt <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent 6758ad9 commit 7add5af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11581,7 +11581,7 @@ if {![info exists have_ttk]} {
1158111581
set use_ttk [expr {$have_ttk && $want_ttk}]
1158211582
set NS [expr {$use_ttk ? "ttk" : ""}]
1158311583

11584-
set git_version [join [lrange [split [lindex [exec git version] end] .] 0 2] .]
11584+
regexp {^git version ([\d.]*\d)} [exec git version] _ git_version
1158511585

1158611586
set show_notes {}
1158711587
if {[package vcompare $git_version "1.6.6.2"] >= 0} {

0 commit comments

Comments
 (0)