Skip to content

Commit 7838d3f

Browse files
committed
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>
1 parent 15430be commit 7838d3f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

macosx/AppMain.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if {[string first -psn [lindex $argv 0]] == 0} {
77
}
88

99
if {[file tail [lindex $argv 0]] eq {gitk}} {
10-
set argv0 [file join $gitexecdir gitk]
10+
set argv0 [lindex $argv 0]
1111
set AppMain_source $argv0
1212
} else {
1313
set argv0 [file join $gitexecdir [file tail [lindex $argv 0]]]

0 commit comments

Comments
 (0)