Skip to contentSkip to conversation

gitk: Handle msysGit version during version comparisons

PATCH Applied Pat Thoyts 4 participants 5 messages Jun 15, 2016

lore
Share & tools
lore

Pat Thoyts

author
#0 lore raw

PATCH 1/1 gitk: Handle msysGit version during version comparisons

msysGit generates version strings with text appended which cannot be used with vcompare. Limit git_version to the first three digits which are the real git version.

---
 gitk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
gitk +1 -1
index 0804e6e..1855390 100755
@@ -11152,7 +11152,7 @@ set nullid2 "0000000000000000000000000000000000000001"
 set nullfile "/dev/null"
 
 set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}]
-set git_version [lindex [exec git version] end]
+set git_version [join [lrange [split [lindex [exec git version] end] .] 0 2] .]
 
 set runq {}
 set history {}
Signature · 1 line
1.6.3.msysgit.0
#1 lore raw
Quoted 3 lines · Pat Thoyts

msysGit generates version strings with text appended which cannot be used with vcompare. Limit git_version to the first three digits which are the real git version.

Thanks, applied.

Paul.

#3 lore raw

Johannes Schindelin venit, vidit, dixit 19.05.2009 10:43:

Quoted 9 lines

Hi,

Quoted 5 lines · Pat Thoyts

msysGit generates version strings with text appended which cannot be used with vcompare. Limit git_version to the first three digits which are the real git version.

Quoted 6 lines
Quoted 1 line

Is that indent intentional?

Ciao,
Dscho

It is clearly indentional :)

[During my git beginnings, the standard output format of git log made me believe I should format commit message bodies like that, too.]

Michael

author
#4 lore raw
Quoted 14 lines · Michael J Gruber

Johannes Schindelin venit, vidit, dixit 19.05.2009 10:43:

Quoted 13 lines

Hi,

Quoted 6 lines · Pat Thoyts

msysGit generates version strings with text appended which cannot be used with vcompare. Limit git_version to the first three digits which are the real git version.

Is that indent intentional?

Quoted 7 lines
Quoted 2 lines

Ciao,
Dscho

It is clearly indentional :)

[During my git beginnings, the standard output format of git log made me believe I should format commit message bodies like that, too.]

It was intentional and the above followup is why. Evidently I should not do so in the future.

Signature · 2 lines
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD