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

[PATCH] git-gui: Handle git versions of the form n.n.n.GIT

From
Julian Phillips <julian@quantumfyre.co.uk>
Date
Jul 17, 2007, 21:14 UTC
Message-ID
<20070717212103.11950.10363.julian@quantumfyre.co.uk>
In-Reply-To
<Pine.LNX.4.64.0707171244080.13359@reaper.quantumfyre.co.uk>

The git-gui version check doesn't handle versions of the form n.n.n.GIT which you can get by installing from an tarball produced by git-archive.

Without this change you get an error of the form: 'Error in startup script: expected version number but got "1.5.3.GIT"'

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
---
Show 11 quoted lines
> I have a machine on which git was installed from a tarball created by 
> running git-archive on master (so a 1.5.3ish version).
> 
> When I try running git-gui I get an error message:
> 
> 'Error in startup script: expected version number but got "1.5.3.GIT"'
> 
> followed by what I assume is a code snippet where it failed (I wouldn't 
> know tcl if it hit me with a large brick).
> 
> Is this expected? driver error? or maybe a bug?

Well, whichever it is, this seems to fix it for me ... with the proviso that I still no nothing about tcl. I am also not sure if it is correct to do the patch against the git repo?

 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 2077261..f8b1f10 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -546,6 +546,7 @@ if {![regsub {^git version } $_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
 
 proc git-version {args} {
 	global _git_version
-- 
1.5.2.2
Previous: Thomas GlanzmannNext: Brian Downing
Message 3 of 13 in “Problem running git-gui”
  1. Julian PhillipsJul 17, 2007
  2. Thomas GlanzmannJul 17, 2007
  3. git-gui: Handle git versions of the form n.n.n.GITJulian Phillips, Jul 17, 2007
  4. Brian DowningJul 17, 2007
  5. Brian DowningJul 17, 2007
  6. Jason SewallJul 17, 2007
  7. Shawn O. PearceJul 18, 2007
  8. Linus TorvaldsJul 17, 2007
  9. Shawn O. PearceJul 18, 2007
  10. Shawn O. PearceJul 18, 2007
  11. Martin LanghoffJul 18, 2007
  12. Shawn O. PearceJul 18, 2007
  13. Julian PhillipsJul 18, 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.