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

RE: [PATCH] git-gui: Look for gitk in $PATH, not $LIBEXEC/git-core

From
MJMurphy, John <john.murphy@bankofamerica.com>
Date
Jul 29, 2008, 12:40 UTC
Message-ID
<80915B5E107BED488500050294C6F48712137A@ex2k.bankofamerica.com>
In-Reply-To
<20080725220544.GD23202@spearce.org>

I have rebuilt git-gui with version 0.10.2.18.gc629 it is still not finding gitk. I have done some debugging in proc _which I have found the issue is with the following line:

set p [file join $p $what$_search_exe]
The variable $p = gitk.exe
And there is no such animal
When I copy gitk to gitk.exe in /usr/local/git/bin, it works fine.
So, not sure if this is a git issue or a git-gui issue.
-John 
-----Original Message-----
From: spearce@spearce.org [mailto:spearce@spearce.org] 
Sent: Friday, July 25, 2008 6:06 PM
To: Abhijit Menon-Sen
Cc: Murphy, John; git@vger.kernel.org
Subject: Re: [PATCH] git-gui: Look for gitk in $PATH, not $LIBEXEC/git-core
Abhijit Menon-Sen <ams@toroid.org> wrote:
Show 7 quoted lines
> At 2008-07-24 09:01:48 -0400, john.murphy@bankofamerica.com wrote:
> >
> > I presume this was just an oversight when git- commands were removed
> > from the bin directory.
> 
> Looks like it. The following patch fixes it for me. Does it work for
> you on Windows?
Thanks.

This patch is obviously correct on any platform except Mac OS X. On Mac OS X it gets confusing because [info nameofexecutable] is a wrapper .app which loads its own main script. That main script needs to use the gitk location it receives from git-gui, and not the location it computes from gitexecdir. So I'm following up your patch with this:

diff --git a/macosx/AppMain.tcl b/macosx/AppMain.tcl
index 41ca08e..ddbe633 100644
--- a/macosx/AppMain.tcl
+++ b/macosx/AppMain.tcl
@@ -7,7 +7,7 @@ if {[string first -psn [lindex $argv 0]] == 0} {
 }
 
 if {[file tail [lindex $argv 0]] eq {gitk}} {
-	set argv0 [file join $gitexecdir gitk]
+	set argv0 [lindex $argv 0]
 	set AppMain_source $argv0
 } else {
 	set argv0 [file join $gitexecdir [file tail [lindex $argv 0]]]
 
-- 
Shawn.
Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 4 of 6 in “Git Gui bug calling gitk”
  1. Murphy, JohnJul 24, 2008
  2. git-gui: Look for gitk in $PATH, not $LIBEXEC/git-coreAbhijit Menon-Sen, Jul 24, 2008
  3. Shawn O. PearceJul 25, 2008
  4. Murphy, JohnJul 29, 2008
  5. Shawn O. PearceJul 29, 2008
  6. Shawn O. PearceJul 30, 2008

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.