From: Clemens Buchacher Date: Sat, 3 Sep 2011 17:06:13 +0000 (+0200) Subject: send-email: add option -h X-Git-Tag: v1.7.8-rc0~130^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c5978246f042967098d7e91b8355c9683a0f3d3c;p=git.git send-email: add option -h Most other git commands print a synopsis when passed -h. Make send-email do the same. Signed-off-by: Clemens Buchacher Signed-off-by: Junio C Hamano --- diff --git a/git-send-email.perl b/git-send-email.perl index 98ab33aae..734356a6f 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -275,7 +275,9 @@ $SIG{INT} = \&signal_handler; # Begin by accumulating all the variables (defined above), that we will end up # needing, first, from the command line: -my $rc = GetOptions("sender|from=s" => \$sender, +my $help; +my $rc = GetOptions("h" => \$help, + "sender|from=s" => \$sender, "in-reply-to=s" => \$initial_reply_to, "subject=s" => \$initial_subject, "to=s" => \@initial_to, @@ -313,6 +315,7 @@ my $rc = GetOptions("sender|from=s" => \$sender, "force" => \$force, ); +usage() if $help; unless ($rc) { usage(); }