Skip to content

Commit

Permalink
git-gui: Correct 'Visualize Branches' on Mac OS X to start gitk
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn O. Pearce committed Jul 25, 2008
1 parent 15430be commit 7838d3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion macosx/AppMain.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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]]]
Expand Down

0 comments on commit 7838d3f

Please sign in to comment.