aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2009-02-07 19:43:57 +0300
committerShawn O. Pearce <spearce@spearce.org>2009-02-08 11:50:58 -0800
commit764369c5ea730894c75f32c2f94a651dd517fc5b (patch)
treec8a8986084df315ea4c432d7d151511c24ebaebd
parent584fa9ccf4b467e7633c100333cadf92e0c07894 (diff)
downloadgit-764369c5ea730894c75f32c2f94a651dd517fc5b.tar.gz
git-764369c5ea730894c75f32c2f94a651dd517fc5b.tar.xz
git-gui: Support more git version notations.
Recently the msysgit repository has got a '1.6.1-msysgit1' tag, which, when used to build the git version, is not handled gracefully by the git-gui version code. This patch changes the regular expressions to fix it, and removes the hardcoded 'rc' string. Now git-gui can accept a version tail like '.foo123.GIT.bar.456.7.g89ab' Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rwxr-xr-xgit-gui.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-gui.sh b/git-gui.sh
index e018e076f..2f1f30501 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -769,9 +769,9 @@ if {![regsub {^git version } $_git_version {} _git_version]} {
set _real_git_version $_git_version
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 {\.[a-zA-Z]+\.?[0-9]+$} $_git_version {} _git_version
regsub {\.GIT$} $_git_version {} _git_version
-regsub {\.[a-zA-Z]+\.[0-9]+$} $_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 .}