diff options
Diffstat (limited to 'git-gui/git-gui.sh')
-rwxr-xr-x | git-gui/git-gui.sh | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh index 8bc8892c40..507fb2b682 100755 --- a/git-gui/git-gui.sh +++ b/git-gui/git-gui.sh @@ -24,7 +24,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program; if not, see <http://www.gnu.org/licenses/>.}] +along with this program; if not, see <https://www.gnu.org/licenses/>.}] ###################################################################### ## @@ -118,7 +118,7 @@ proc sanitize_command_line {command_line from_index} { set i $from_index while {$i < [llength $command_line]} { set cmd [lindex $command_line $i] - if {[file pathtype $cmd] ne "absolute"} { + if {[llength [file split $cmd]] < 2} { set fullpath [_which $cmd] if {$fullpath eq ""} { throw {NOT-FOUND} "$cmd not found in PATH" @@ -661,31 +661,8 @@ proc git_write {args} { } proc githook_read {hook_name args} { - set pchook [gitdir hooks $hook_name] - lappend args 2>@1 - - # On Windows [file executable] might lie so we need to ask - # the shell if the hook is executable. Yes that's annoying. - # - if {[is_Windows]} { - upvar #0 _sh interp - if {![info exists interp]} { - set interp [_which sh] - } - if {$interp eq {}} { - error "hook execution requires sh (not in PATH)" - } - - set scr {if test -x "$1";then exec "$@";fi} - set sh_c [list $interp -c $scr $interp $pchook] - return [_open_stdout_stderr [concat $sh_c $args]] - } - - if {[file executable $pchook]} { - return [_open_stdout_stderr [concat [list $pchook] $args]] - } - - return {} + set cmd [concat git hook run --ignore-missing $hook_name -- $args 2>@1] + return [_open_stdout_stderr $cmd] } proc kill_file_process {fd} { @@ -2390,7 +2367,7 @@ proc do_quit {{rc {1}}} { set ret_code $rc # Briefly enable send again, working around Tk bug - # http://sourceforge.net/tracker/?func=detail&atid=112997&aid=1821174&group_id=12997 + # https://sourceforge.net/p/tktoolkit/bugs/2343/ tk appname [appname] destroy . @@ -3075,7 +3052,7 @@ if {$doc_path ne {}} { if {[file isfile $doc_path]} { set doc_url "file:$doc_path" } else { - set doc_url {http://www.kernel.org/pub/software/scm/git/docs/} + set doc_url {https://www.kernel.org/pub/software/scm/git/docs/} } proc start_browser {url} { |