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

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

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 18, 2007, 02:54 UTC
Message-ID
<20070718025442.GX32566@spearce.org>
In-Reply-To
<46a038f90707171932m67c51388jb2304f0b1873e3a6@mail.gmail.com>
Martin Langhoff <martin.langhoff@gmail.com> wrote:
Show 6 quoted lines
> On 7/17/07, Shawn O. Pearce <spearce@spearce.org> wrote:
> >  Applying git-gui: Handle git versions of the form n.n.n.GIT
> >
> 
> I'm far from an authority on things TCL, but I don't think this patch
> should be merged as is.
Too late, already applied and pushed.  ;-)
> Julian is reporting it as a "fixes my symptom"
> patch, and that's barely what it does.
> 
> The regex should be more liberal, imho. With this superficial fix:
I think we are now cleaning up the Git version as best we can:
  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

The first fixes the -dirty build problem. The second drops off the extra information that git-describe throws into the mix when it generates output for a non-tagged commit. The third kills the rc* component if this is a release candidate. Note that the rc* killer must come after the git-describe killer, as the rc* part is actually in the real tag. The last one fixes the weird case where the user has somehow bungled his git software distribution so it cannot generate a git version via git-describe *and* they have no `version` file in the source code directory. Such people really should fix their git. But anyway we do support it now.

> - Builds from a repo with a nonstandard (local) tagname tagname  have
> a broken git gui

This I cannot do anything about, other than maybe to warn the user that they are about to run with a version of Git that we cannot verify and hence we have no idea if git-gui will work correctly, or fall flat on its face.

I'll add in a confirmation dialog for this case. That way the user can make the decision. User always knows best.

-- 
Shawn.
Previous: Martin LanghoffNext: Julian Phillips
Message 12 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.