{"thread":{"id":"10168","subject":"[PATCH] git-gui: accept versions containing text annotations, like 1.5.3.mingw.1","startedAt":"2007-10-06T13:27:22Z","lastAt":"2007-10-06T13:27:22Z","messageCount":1,"participants":["Steffen Prohaska"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"55015","messageId":"11916772423623-git-send-email-prohaska@zib.de","threadId":"10168","inReplyTo":null,"subject":"[PATCH] git-gui: accept versions containing text annotations, like 1.5.3.mingw.1","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-10-06T13:27:22Z","receivedAt":"2007-10-06T13:27:22Z","isPatch":true,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"This commit teaches git-gui to accept versions with annotations\nthat start with text and optionally end with a dot followed by\na number.\n\nThis is needed by the current versioning scheme of msysgit,\nwhich uses versions like 1.5.3.mingw.1. However, the changes\nis not limited to this use case. Any version of the form\n<numeric version>.<anytext>.<number> would be parsed and only\nthe starting <numeric version> used for validation.\n\nSigned-off-by: Steffen Prohaska <prohaska@zib.de>\n---\n git-gui/git-gui.sh |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\nindex bb1e7f3..f671eea 100755\n--- a/git-gui/git-gui.sh\n+++ b/git-gui/git-gui.sh\n@@ -666,6 +666,7 @@ regsub -- {-dirty$} $_git_version {} _git_version\n regsub {\\.[0-9]+\\.g[0-9a-f]+$} $_git_version {} _git_version\n regsub {\\.rc[0-9]+$} $_git_version {} _git_version\n regsub {\\.GIT$} $_git_version {} _git_version\n+regsub {\\.[a-zA-Z]+(\\.[0-9]+)$} $_git_version {} _git_version\n \n if {![regexp {^[1-9]+(\\.[0-9]+)+$} $_git_version]} {\n \tcatch {wm withdraw .}\n-- \n1.5.3.mingw.1.106.g1610f-dirty\n"}]}