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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxx>
---

> 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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux