mirror of
https://github.com/git/git.git
synced 2024-11-25 10:54:00 +08:00
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>
This commit is contained in:
parent
2810a58dba
commit
ea47503d4d
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user