aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteffen Prohaska <prohaska@zib.de>2007-10-06 15:27:22 +0200
committerShawn O. Pearce <spearce@spearce.org>2007-10-07 17:15:27 -0700
commit96f11953c0b0b9b0a0c75fb98bdf239dce5ff582 (patch)
treeb4ca75bf3c7599fb6a2e03c9f4c8f8d132c8e091
parent906ab7f6c03764423adef6c0e4d77442405adc23 (diff)
downloadgit-96f11953c0b0b9b0a0c75fb98bdf239dce5ff582.tar.gz
git-96f11953c0b0b9b0a0c75fb98bdf239dce5ff582.tar.xz
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>
-rwxr-xr-xgit-gui.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh
index cf88a0d82..9335a9761 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -538,6 +538,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 .}