Thread (13 messages) flat view 13 messages, 7 authors, 2016-06-15
DORMANTno replies

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

From: Julian Phillips <hidden>
Date: 2016-06-15 22:43:22
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help