git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-gui: relax "dirty" version detection

From
Wincent Colaiuta <win@wincent.com>
Date
Feb 18, 2008, 08:36 UTC
Message-ID
<1203323793-18020-1-git-send-email-win@wincent.com>

"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>
---
 git-gui/git-gui.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 5d65272..238a239 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -663,7 +663,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
-- 
1.5.4.2.dirty
Next: Shawn O. Pearce
Message 1 of 2 in “git-gui: relax "dirty" version detection”
  1. git-gui: relax "dirty" version detectionWincent Colaiuta, Feb 18, 2008
  2. Shawn O. PearceFeb 20, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.