@matheusbsbs / matheus-bagliano / commits / 02efd48f52
Fork 0

git-gui: Correct gitk installation location

The master Makefile in git.git installs gitk into bindir, not gitexecdir, which means gitk is located as a sibling of the git wrapper and not as though it were a git helper tool. We can also avoid some Tcl concat operations by letting eval do all of the heavy lifting; we have two proper Tcl lists ($cmd and $revs) that we are joining together and $revs is currently never an empty list. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Jul 9, 2007 at 02:10 UTC 02efd48f520d14012fc82c999172306a94862dee
1 file changed +4 -12
git-gui.sh
+4 -12
@@ -1303,24 +1303,16 @@ proc incr_font_size {font {amt 1}} {
1303 set starting_gitk_msg {Starting gitk... please wait...}
1304
1305 proc do_gitk {revs} {
1306 - global env starting_gitk_msg
1307 -
1306 # -- Always start gitk through whatever we were loaded with. This
1307 # lets us bypass using shell process on Windows systems.
1308 #
1311 - set cmd [list [info nameofexecutable]]
1312 - set exe [gitexec gitk]
1313 - lappend cmd $exe
1314 - if {$revs ne {}} {
1315 - append cmd { }
1316 - append cmd $revs
1317 - }
1318 -
1309 + set exe [file join [file dirname $::_git] gitk]
1310 + set cmd [list [info nameofexecutable] $exe]
1311 if {! [file exists $exe]} {
1312 error_popup "Unable to start gitk:\n\n$exe does not exist"
1313 } else {
1322 - eval exec $cmd &
1323 - ui_status $starting_gitk_msg
1314 + eval exec $cmd $revs &
1315 + ui_status $::starting_gitk_msg
1316 after 10000 {
1317 ui_ready $starting_gitk_msg
1318 }