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

[PATCH] git-gui: accept versions containing text annotations, like 1.5.3.mingw.1

From
Steffen Prohaska <prohaska@zib.de>
Date
Oct 6, 2007, 13:27 UTC
Message-ID
<11916772423623-git-send-email-prohaska@zib.de>

This commit teaches git-gui to accept versions with annotations that start with text and optionally end with a dot followed by a number.

This is needed by the current versioning scheme of msysgit, which uses versions like 1.5.3.mingw.1. However, the changes is not limited to this use case. Any version of the form <numeric version>.<anytext>.<number> would be parsed and only the starting <numeric version> used for validation.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
---
 git-gui/git-gui.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index bb1e7f3..f671eea 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -666,6 +666,7 @@ 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
+regsub {\.[a-zA-Z]+(\.[0-9]+)$} $_git_version {} _git_version
 
 if {![regexp {^[1-9]+(\.[0-9]+)+$} $_git_version]} {
 	catch {wm withdraw .}
-- 
1.5.3.mingw.1.106.g1610f-dirty
Message 1 of 1 in “git-gui: accept versions containing text annotations, like 1.5.3.mingw.1”
  1. git-gui: accept versions containing text annotations, like 1.5.3.mingw.1Steffen Prohaska, Oct 6, 2007

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.