git-gui: Make usage statement visible on Windows.
[gitweb.git] / git-gui.sh
index bb104895a94450a2ade7446c8fda52910bae0868..e554043e99ce25bf1066e930a3be67d54b4e0ec5 100755 (executable)
@@ -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
 }