aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2010-08-08 00:07:01 +0100
committerPat Thoyts <patthoyts@users.sourceforge.net>2010-08-08 00:07:01 +0100
commitea47503d4dc80db54dbb8e568f7a7058ec25bacb (patch)
tree0a24d8603a2e5af1f5c1fe57514aa5d9a4120b84
parent2810a58dba6d06f4d1816fb06500c117feebd830 (diff)
downloadgit-ea47503d4dc80db54dbb8e568f7a7058ec25bacb.tar.gz
git-ea47503d4dc80db54dbb8e568f7a7058ec25bacb.tar.xz
git-gui: Make usage statement visible on Windows.
On Windows stdout and stderr are not connected to anything so the usage statement is never shown to the user when an error is made with a command line like 'git gui browser'. Use a messagebox on windows. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
-rwxr-xr-xgit-gui.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/git-gui.sh b/git-gui.sh
index bb104895a..e554043e9 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2845,7 +2845,13 @@ bind all <$M1B-Key-W> {destroy [winfo toplevel %W]}
set subcommand_args {}
proc usage {} {
- puts stderr "usage: $::argv0 $::subcommand $::subcommand_args"
+ set s "usage: $::argv0 $::subcommand $::subcommand_args"
+ if {[tk windowingsystem] eq "win32"} {
+ wm withdraw .
+ tk_messageBox -icon info -title "Usage" -message $s
+ } else {
+ puts stderr $s
+ }
exit 1
}