summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-07-09 06:10:39 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-07-09 06:10:39 (GMT)
commit02efd48f520d14012fc82c999172306a94862dee (patch)
treec98f2a1832ccdc2f50c2b1b1bd0a843f55a1859d /git-gui.sh
parent0b81261622afad691501ee51d7811048cf4a5fce (diff)
downloadgit-02efd48f520d14012fc82c999172306a94862dee.zip
git-02efd48f520d14012fc82c999172306a94862dee.tar.gz
git-02efd48f520d14012fc82c999172306a94862dee.tar.bz2
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>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh16
1 files changed, 4 insertions, 12 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 09f49ce..53cf898 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1303,24 +1303,16 @@ proc incr_font_size {font {amt 1}} {
set starting_gitk_msg {Starting gitk... please wait...}
proc do_gitk {revs} {
- global env starting_gitk_msg
-
# -- Always start gitk through whatever we were loaded with. This
# lets us bypass using shell process on Windows systems.
#
- set cmd [list [info nameofexecutable]]
- set exe [gitexec gitk]
- lappend cmd $exe
- if {$revs ne {}} {
- append cmd { }
- append cmd $revs
- }
-
+ set exe [file join [file dirname $::_git] gitk]
+ set cmd [list [info nameofexecutable] $exe]
if {! [file exists $exe]} {
error_popup "Unable to start gitk:\n\n$exe does not exist"
} else {
- eval exec $cmd &
- ui_status $starting_gitk_msg
+ eval exec $cmd $revs &
+ ui_status $::starting_gitk_msg
after 10000 {
ui_ready $starting_gitk_msg
}