threads / patch / 19408

patchgitk: Handle msysGit version during version comparisons

Subject: [PATCH] gitk: Handle msysGit version during version comparisons

## tl;dr

5 messages between May 18, 2009 and May 19, 2009. Diffs are folded; open one to read it.

replies: 4people: 4as markdown or json

Pat Thoyts· May 18, 2009, 21:46 UTC · lore
  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.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
---
 gitk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to gitk +1 −1
diff --git a/gitk b/gitk
index 0804e6e..1855390 100755
--- a/gitk
+++ b/gitk
@@ -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 {}
-- 
1.6.3.msysgit.0
Paul Mackerras· May 18, 2009, 22:57 UTC · re: Pat Thoyts · lore

Re: [PATCH] gitk: Handle msysGit version during version comparisons

Pat Thoyts writes:
>   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.
Johannes Schindelin· May 19, 2009, 08:43 UTC · re: Pat Thoyts · lore

Re: [PATCH] gitk: Handle msysGit version during version comparisons

Hi,
On Mon, 18 May 2009, Pat Thoyts wrote:
Show 6 quoted lines
> 
>   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.
> 
> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Is that indent intentional?

Ciao, Dscho

Michael J Gruber· May 19, 2009, 08:51 UTC · re: Johannes Schindelin · lore

Re: [PATCH] gitk: Handle msysGit version during version comparisons

Johannes Schindelin venit, vidit, dixit 19.05.2009 10:43:
Show 15 quoted lines
> Hi,
> 
> On Mon, 18 May 2009, Pat Thoyts wrote:
> 
>>
>>   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.
>>
>> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
> 
> 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
Pat Thoyts· May 19, 2009, 10:38 UTC · re: Michael J Gruber · lore

Re: [PATCH] gitk: Handle msysGit version during version comparisons

Michael J Gruber <git@drmicha.warpmail.net> writes:
Show 21 quoted lines
>Johannes Schindelin venit, vidit, dixit 19.05.2009 10:43:
>> Hi,
>> 
>> On Mon, 18 May 2009, Pat Thoyts wrote:
>> 
>>>
>>>   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.
>>>
>>> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
>> 
>> 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.]

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

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

← back to recent threads