From: Shawn O. Pearce Date: Fri, 25 Jul 2008 22:08:33 +0000 (-0700) Subject: git-gui: Correct 'Visualize Branches' on Mac OS X to start gitk X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;ds=sidebyside;h=7838d3fb41ed7d738e2cbdf8e4f40f0367f4f46f;p=~andy%2Fgit git-gui: Correct 'Visualize Branches' on Mac OS X to start gitk In Git 1.6 and later gitk is in $prefix/bin while git-gui and all of the other commands are in $gitexecdir, which is typically not the same as $prefix/bin. So we cannot launch $gitexecdir/gitk and expect it to actually start gitk properly. By allowing git-gui to locate the script via $PATH and then using exactly that path when we source it during the application start we can correctly run gitk on any Git 1.5 or later. Signed-off-by: Shawn O. Pearce --- diff --git a/macosx/AppMain.tcl b/macosx/AppMain.tcl index 41ca08e2b..ddbe6334a 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]]]