summaryrefslogtreecommitdiff
path: root/git-gui/git-gui.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-16 20:06:55 -0700
committerJunio C Hamano <gitster@pobox.com>2013-06-16 20:06:55 -0700
commitfb7dfaa710da6f9ebb854f70ffc1c78668a1e70c (patch)
treee09f2a46099de99a00e1a256b5dfad02927c7ad9 /git-gui/git-gui.sh
parent0dbd81251dbc516bb3bf07862c369fc582a4e5e0 (diff)
parent8a383db4b28059becc3ebfd1b402299e34c3151f (diff)
downloadgit-fb7dfaa710da6f9ebb854f70ffc1c78668a1e70c.tar.gz
Merge tag 'gitgui-0.18.0' of git://repo.or.cz/git-gui
git-gui 0.18.0 * tag 'gitgui-0.18.0' of git://repo.or.cz/git-gui: git-gui 0.18 git-gui: avoid an error message when removing the last remote git-gui: fix file name handling with non-empty prefix git-gui: bring wish process to front on Mac git-gui: change dialog button positions for Windows to suit platform. git-gui: allow "\ No newline at end of file" for linewise staging git-gui: fix the mergetool launcher for the Beyond Compare tool. Makefile: replace "echo 1>..." with "echo >..." French translation: copy -> copie. git-gui: Fix parsing of <rev> <path-which-not-present-in-worktree>
Diffstat (limited to 'git-gui/git-gui.sh')
-rwxr-xr-xgit-gui/git-gui.sh27
1 files changed, 17 insertions, 10 deletions
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 89f636f496..153f85da06 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -137,6 +137,20 @@ unset oguimsg
######################################################################
##
+## On Mac, bring the current Wish process window to front
+
+if {[tk windowingsystem] eq "aqua"} {
+ catch {
+ exec osascript -e [format {
+ tell application "System Events"
+ set frontmost of processes whose unix id is %d to true
+ end tell
+ } [pid]]
+ }
+}
+
+######################################################################
+##
## read only globals
set _appname {Git Gui}
@@ -3003,18 +3017,11 @@ blame {
set jump_spec {}
set is_path 0
foreach a $argv {
- if {[file exists $a]} {
- if {$path ne {}} usage
- set path [normalize_relpath $a]
- break
- } elseif {[file exists $_prefix$a]} {
- if {$path ne {}} usage
- set path [normalize_relpath $_prefix$a]
- break
- }
+ set p [file join $_prefix $a]
- if {$is_path} {
+ if {$is_path || [file exists $p]} {
if {$path ne {}} usage
+ set path [normalize_relpath $p]
break
} elseif {$a eq {--}} {
if {$path ne {}} {