Skip to content

Commit

Permalink
send-email: add option -h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Clemens Buchacher authored and Junio C Hamano committed Sep 13, 2011
1 parent 4b5eac7 commit c597824
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ sub 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,
Expand Down Expand Up @@ -313,6 +315,7 @@ sub signal_handler {
"force" => \$force,
);

usage() if $help;
unless ($rc) {
usage();
}
Expand Down

0 comments on commit c597824

Please sign in to comment.