Code

git-gui: relax "dirty" version detection
authorWincent Colaiuta <win@wincent.com>
Mon, 18 Feb 2008 08:36:33 +0000 (09:36 +0100)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 20 Feb 2008 01:50:29 +0000 (20:50 -0500)
"git gui" would complain at launch if the local version of Git was
"1.5.4.2.dirty". Loosen the regular expression to look for either
"-dirty" or ".dirty", thus eliminating spurious warnings.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh

index f42e461fd42ad37075d433f3509d6bd415a0b97a..04bd42576eae325b848b1438f1a4ff2820645df3 100755 (executable)
@@ -662,7 +662,7 @@ if {![regsub {^git version } $_git_version {} _git_version]} {
 }
 
 set _real_git_version $_git_version
-regsub -- {-dirty$} $_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 {\.GIT$} $_git_version {} _git_version