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 <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
4b5eac7f03
commit
c5978246f0
@ -275,7 +275,9 @@ $SIG{INT} = \&signal_handler;
|
|||||||
# Begin by accumulating all the variables (defined above), that we will end up
|
# Begin by accumulating all the variables (defined above), that we will end up
|
||||||
# needing, first, from the command line:
|
# 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,
|
"in-reply-to=s" => \$initial_reply_to,
|
||||||
"subject=s" => \$initial_subject,
|
"subject=s" => \$initial_subject,
|
||||||
"to=s" => \@initial_to,
|
"to=s" => \@initial_to,
|
||||||
@ -313,6 +315,7 @@ my $rc = GetOptions("sender|from=s" => \$sender,
|
|||||||
"force" => \$force,
|
"force" => \$force,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
usage() if $help;
|
||||||
unless ($rc) {
|
unless ($rc) {
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user