git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [GIT GUI PATCH] git-gui: use vcompare when comparing the git version

From
Pat Thoyts <patthoyts@users.sourceforge.net>
Date
May 17, 2014, 12:23 UTC
Message-ID
<87k39kbnmg.fsf@fox.patthoyts.tk>
In-Reply-To
<xmqqk39ohvyp.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 18 quoted lines
>Junio C Hamano <gitster@pobox.com> writes:
>
>> Jens Lehmann <Jens.Lehmann@web.de> writes:
>>
>>> Junio, I believe this issue needs to be fixed before 2.0 final. Otherwise
>>> git gui will not work inside submodules anymore due to the major version
>>> number change from 1 to 2. I'd like to hear Pat's opinion on this; even
>>> though I think my patch is less risky (as it doesn't change behavior for
>>> pre-2 versions), he might like Chris' proposal better.
>>
>> Thanks; I share the same feeling.
>
>So after checking git://repo.or.cz/git-gui.git/ and seeing that I am
>not missing any commit from there, I tentatively created a fork of
>it, applied your patch and merged it somewhere on 'pu' that is close
>to 'next'.  We may want to fast-track it to 2.0 without waiting for
>an Ack from Pat but let's give him one more day to respond.
>

The analysis about the major version number being significant is correct. By default vsatisfies assumes that a major version number change means all lesser versions are incompatible. However, you can prevent that assumption using an unlimited check by appending a - (minus sign) to the version to yield an open ended range. Or by giving another range. So the only change required is to append a minus.

  package vsatisfies $::_git_version 1.7.0-
will suffice.
  package vsatisfies $::_git_version 1.7.0 2.0.0
would work but would cause failures when we arrive at git 3.0
-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD
Previous: Junio C HamanoNext: Jens Lehmann
Message 12 of 16 in “git gui error with relocated repository”
  1. Chris PackhamApr 29, 2014
  2. Chris PackhamApr 29, 2014
  3. git-gui: unconditionally use rev-parse --show-toplevelChris Packham, Apr 29, 2014
  4. Pat ThoytsMay 6, 2014
  5. Chris PackhamMay 7, 2014
  6. Chris PackhamMay 7, 2014
  7. git-gui: use vcompare when comparing the git versionJens Lehmann, May 13, 2014
  8. Chris PackhamMay 14, 2014
  9. Jens LehmannMay 14, 2014
  10. Junio C HamanoMay 14, 2014
  11. Junio C HamanoMay 14, 2014
  12. Pat ThoytsMay 17, 2014
  13. git-gui: tolerate major version changes when comparing the git versionJens Lehmann, May 17, 2014
  14. Chris PackhamMay 18, 2014
  15. Eric SunshineMay 18, 2014
  16. Junio C HamanoMay 19, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.