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 <spearce@spearce.org>
Shawn O. Pearce committed
Jul 25, 2008 at 15:08 UTC
7838d3fb41ed7d738e2cbdf8e4f40f0367f4f46f
1 file changed
+1
-1
macosx/AppMain.tcl
+1
-1
@@ -7,7 +7,7 @@ if {[string first -psn [lindex $argv 0]] == 0} {
7
}
8
9
if {[file tail [lindex $argv 0]] eq {gitk}} {
10
- set argv0 [file join $gitexecdir gitk]
10
+ set argv0 [lindex $argv 0]
11
set AppMain_source $argv0
12
} else {
13
set argv0 [file join $gitexecdir [file tail [lindex $argv 0]]]