diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-07-27 14:09:25 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-27 14:09:25 -0700 |
commit | 392f1300911120fbaa4b77c737fe13e205726aca (patch) | |
tree | 15e0e21eeef25ca4e49d1d413d85c9885338bf15 /git-gui/git-gui.sh | |
parent | b0320eaf6a25fbc4adf35d611c27006e6d853aa8 (diff) | |
parent | c7f7457026dc2f6979842f81cc17098579fec8d8 (diff) | |
download | git-392f1300911120fbaa4b77c737fe13e205726aca.tar.gz |
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui:
git-gui: "Stage Line": Treat independent changes in adjacent lines better
git-gui: Fix "Stage/Unstage Line" with one line of context.
git-gui: Correct 'Visualize Branches' on Mac OS X to start gitk
git-gui: Look for gitk in $PATH, not $LIBEXEC/git-core
Add a menu item to invoke full copy detection in blame.
Kill the blame back-end on window close.
Add options to control the search for copies in blame.
Fix pre-commit hooks under MinGW/MSYS
Diffstat (limited to 'git-gui/git-gui.sh')
-rwxr-xr-x | git-gui/git-gui.sh | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh index 940677cbd8..7c27a43a5d 100755 --- a/git-gui/git-gui.sh +++ b/git-gui/git-gui.sh @@ -473,10 +473,10 @@ proc githook_read {hook_name args} { set pchook [gitdir hooks $hook_name] lappend args 2>@1 - # On Cygwin [file executable] might lie so we need to ask + # On Windows [file executable] might lie so we need to ask # the shell if the hook is executable. Yes that's annoying. # - if {[is_Cygwin]} { + if {[is_Windows]} { upvar #0 _sh interp if {![info exists interp]} { set interp [_which sh] @@ -497,6 +497,20 @@ proc githook_read {hook_name args} { return {} } +proc kill_file_process {fd} { + set process [pid $fd] + + catch { + if {[is_Windows]} { + # Use a Cygwin-specific flag to allow killing + # native Windows processes + exec kill -f $process + } else { + exec kill $process + } + } +} + proc sq {value} { regsub -all ' $value "'\\''" value return "'$value'" @@ -642,6 +656,8 @@ set default_config(user.email) {} set default_config(gui.matchtrackingbranch) false set default_config(gui.pruneduringfetch) false set default_config(gui.trustmtime) false +set default_config(gui.fastcopyblame) false +set default_config(gui.copyblamethreshold) 40 set default_config(gui.diffcontext) 5 set default_config(gui.commitmsgwidth) 75 set default_config(gui.newbranchtemplate) {} @@ -1670,10 +1686,10 @@ 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 [file join [file dirname $::_git] gitk] + set exe [_which gitk] set cmd [list [info nameofexecutable] $exe] - if {! [file exists $exe]} { - error_popup [mc "Unable to start gitk:\n\n%s does not exist" $exe] + if {$exe eq {}} { + error_popup [mc "Couldn't find gitk in PATH"] } else { global env |