Skip to contentSkip to conversation

git-gui: accept versions containing text annotations, like 1.5.3.mingw.1

PATCH New Steffen Prohaska 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-gui: accept versions containing text annotations, like 1.5.3.mingw.1

This commit teaches git-gui to accept versions with annotations that start with text and optionally end with a dot followed by a number.

This is needed by the current versioning scheme of msysgit, which uses versions like 1.5.3.mingw.1. However, the changes is not limited to this use case. Any version of the form <numeric version>.<anytext>.<number> would be parsed and only the starting <numeric version> used for validation.

---
 git-gui/git-gui.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
git-gui/git-gui.sh +1 -0
index bb1e7f3..f671eea 100755
@@ -666,6 +666,7 @@ regsub -- {-dirty$} $_git_version {} _git_version
 regsub {\.[0-9]+\.g[0-9a-f]+$} $_git_version {} _git_version
 regsub {\.rc[0-9]+$} $_git_version {} _git_version
 regsub {\.GIT$} $_git_version {} _git_version
+regsub {\.[a-zA-Z]+(\.[0-9]+)$} $_git_version {} _git_version
 
 if {![regexp {^[1-9]+(\.[0-9]+)+$} $_git_version]} {
 	catch {wm withdraw .}
Signature · 1 line
1.5.3.mingw.1.106.g1610f-dirty