summaryrefslogtreecommitdiff
path: root/git-gui/git-gui.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-07-30 07:18:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-07-30 07:18:26 (GMT)
commit731ab1f55e7ba736b24708a63e93a7c8d581a4d6 (patch)
tree602f7ddda98503fda6f2d014ca322beaf79a868f /git-gui/git-gui.sh
parentc70115b4b1a8c197b9b829b1fd15d578a3ffcdc3 (diff)
parent5fc6edab76ea16c5fad7138389c2fcc2076534e7 (diff)
downloadgit-731ab1f55e7ba736b24708a63e93a7c8d581a4d6.zip
git-731ab1f55e7ba736b24708a63e93a7c8d581a4d6.tar.gz
git-731ab1f55e7ba736b24708a63e93a7c8d581a4d6.tar.bz2
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui: git-gui (Windows): Change wrapper to execdir 'libexec/git-core' git-gui (Windows): Switch to relative discovery of oguilib git-gui: Correct installation of library to be $prefix/share git-gui: Fix gitk search in $PATH to work on Windows git-gui: Preserve scroll position on reshow_diff. git-gui: Fix the Remote menu separator.
Diffstat (limited to 'git-gui/git-gui.sh')
-rwxr-xr-xgit-gui/git-gui.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 7c27a43..14b2d9a 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -317,7 +317,7 @@ proc _git_cmd {name} {
return $v
}
-proc _which {what} {
+proc _which {what args} {
global env _search_exe _search_path
if {$_search_path eq {}} {
@@ -340,8 +340,14 @@ proc _which {what} {
}
}
+ if {[is_Windows] && [lsearch -exact $args -script] >= 0} {
+ set suffix {}
+ } else {
+ set suffix $_search_exe
+ }
+
foreach p $_search_path {
- set p [file join $p $what$_search_exe]
+ set p [file join $p $what$suffix]
if {[file exists $p]} {
return [file normalize $p]
}
@@ -1686,7 +1692,7 @@ 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 [_which gitk]
+ set exe [_which gitk -script]
set cmd [list [info nameofexecutable] $exe]
if {$exe eq {}} {
error_popup [mc "Couldn't find gitk in PATH"]
@@ -2925,6 +2931,7 @@ if {[is_enabled transport]} {
populate_fetch_menu
set n [expr {[.mbar.remote index end] - $n}]
if {$n > 0} {
+ if {[.mbar.remote type 0] eq "tearoff"} { incr n }
.mbar.remote insert $n separator
}
unset n