@matheusbsbs / matheus-bagliano / commits / 96f11953c0
Fork 0

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. [sp: Minor edit to remove unnecessary group matching] Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Steffen Prohaska committed Oct 6, 2007 at 15:27 UTC 96f11953c0b0b9b0a0c75fb98bdf239dce5ff582
1 file changed +1
git-gui.sh
+1
@@ -538,6 +538,7 @@ regsub -- {-dirty$} $_git_version {} _git_version
538 regsub {\.[0-9]+\.g[0-9a-f]+$} $_git_version {} _git_version
539 regsub {\.rc[0-9]+$} $_git_version {} _git_version
540 regsub {\.GIT$} $_git_version {} _git_version
541 +regsub {\.[a-zA-Z]+\.[0-9]+$} $_git_version {} _git_version
542
543 if {![regexp {^[1-9]+(\.[0-9]+)+$} $_git_version]} {
544 catch {wm withdraw .}