From ea47503d4dc80db54dbb8e568f7a7058ec25bacb Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Sun, 8 Aug 2010 00:07:01 +0100 Subject: [PATCH] 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 --- git-gui.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 } -- 2.30.2