X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-gui.sh;h=14b2d9aacd1d28084f195365b434747df2ddc95d;hb=7cce5b2cbc12a73eca3f62a885e9dbad17b250a5;hp=7c27a43a5de5394d2d1a482c456c1123798b64fc;hpb=15430be5a1d17b888b45b608daab7573f24cf9f1;p=git.git diff --git a/git-gui.sh b/git-gui.sh index 7c27a43a5..14b2d9aac 100755 --- a/git-gui.sh +++ b/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