summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2010-10-05 23:39:54 +0100
committerPat Thoyts <patthoyts@users.sourceforge.net>2010-10-05 23:39:54 +0100
commit7ae1e727622883c029550e0b99488c6d058a94bc (patch)
tree816df26672183b6bb0d8d0b13f07cf2fe208297b
parentff9db6c79d57c9f8921db39a73772e70ab76a1e3 (diff)
downloadgit-7ae1e727622883c029550e0b99488c6d058a94bc.tar.gz
git-gui: show command-line errors in a messagebox on Windows
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
-rwxr-xr-xgit-gui.sh26
1 files changed, 16 insertions, 10 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 422d4ff5bd..ed0904d993 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2863,7 +2863,8 @@ proc usage {} {
set s "usage: $::argv0 $::subcommand $::subcommand_args"
if {[tk windowingsystem] eq "win32"} {
wm withdraw .
- tk_messageBox -icon info -title "Usage" -message $s
+ tk_messageBox -icon info -message $s \
+ -title [mc "Usage"]
} else {
puts stderr $s
}
@@ -2936,7 +2937,11 @@ blame {
if {[catch {
set head [git rev-parse --verify $head]
} err]} {
- puts stderr $err
+ if {[tk windowingsystem] eq "win32"} {
+ tk_messageBox -icon error -title [mc Error] -message $err
+ } else {
+ puts stderr $err
+ }
exit 1
}
}
@@ -2975,18 +2980,19 @@ blame {
citool -
gui {
if {[llength $argv] != 0} {
- puts -nonewline stderr "usage: $argv0"
- if {$subcommand ne {gui}
- && [file tail $argv0] ne "git-$subcommand"} {
- puts -nonewline stderr " $subcommand"
- }
- puts stderr {}
- exit 1
+ usage
}
# fall through to setup UI for commits
}
default {
- puts stderr "usage: $argv0 \[{blame|browser|citool}\]"
+ set err "usage: $argv0 \[{blame|browser|citool}\]"
+ if {[tk windowingsystem] eq "win32"} {
+ wm withdraw .
+ tk_messageBox -icon error -message $err \
+ -title [mc "Usage"]
+ } else {
+ puts stderr $err
+ }
exit 1
}
}