summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2810a58)
raw | patch | inline | side by side (parent: 2810a58)
author | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Sat, 7 Aug 2010 23:07:01 +0000 (00:07 +0100) | ||
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Sat, 7 Aug 2010 23:07:01 +0000 (00:07 +0100) |
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>
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>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index bb104895a94450a2ade7446c8fda52910bae0868..e554043e99ce25bf1066e930a3be67d54b4e0ec5 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
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
}