Code

git-gui: Look for gitk in $PATH, not $LIBEXEC/git-core
authorAbhijit Menon-Sen <ams@toroid.org>
Thu, 24 Jul 2008 13:28:53 +0000 (18:58 +0530)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 25 Jul 2008 21:58:31 +0000 (14:58 -0700)
Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh

index 83e2645714e11ab783144bb8dc71a968502640d1..7c27a43a5de5394d2d1a482c456c1123798b64fc 100755 (executable)
@@ -1686,10 +1686,10 @@ proc do_gitk {revs} {
        # -- Always start gitk through whatever we were loaded with.  This
        #    lets us bypass using shell process on Windows systems.
        #
-       set exe [file join [file dirname $::_git] gitk]
+       set exe [_which gitk]
        set cmd [list [info nameofexecutable] $exe]
-       if {! [file exists $exe]} {
-               error_popup [mc "Unable to start gitk:\n\n%s does not exist" $exe]
+       if {$exe eq {}} {
+               error_popup [mc "Couldn't find gitk in PATH"]
        } else {
                global env