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

[PATCH (GIT-GUI)] git-gui: Support more git version notations.

From
Alexander Gavrilov <angavrilov@gmail.com>
Date
Feb 7, 2009, 16:43 UTC
Message-ID
<200902071943.58106.angavrilov@gmail.com>

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>
---
 git-gui.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-gui.sh b/git-gui.sh
index e018e07..2f1f305 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 .}
-- 
1.6.1.2.35.g919ab
Message 1 of 1 in “git-gui: Support more git version notations.”
  1. git-gui: Support more git version notations.Alexander Gavrilov, Feb 7, 2009

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.