From: Shawn O. Pearce Date: Mon, 16 Jul 2007 06:39:07 +0000 (-0400) Subject: git-gui: Skip -dirty suffix on core git versions X-Git-Tag: gitgui-0.8.0~49 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2dfa54c6cb39c443652440f1ee6fdf5a6067364a;p=git.git git-gui: Skip -dirty suffix on core git versions If the user is running a 'dirty' version of git (one compiled in a working directory with modified files) we want to just assume it was a committed version, as we really only look at the part that came from a real annotated tag anyway. Signed-off-by: Shawn O. Pearce --- diff --git a/git-gui.sh b/git-gui.sh index 2077261e6..bdb557184 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -544,6 +544,7 @@ if {![regsub {^git version } $_git_version {} _git_version]} { error_popup "Cannot parse Git version string:\n\n$_git_version" exit 1 } +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