diff options
author | Clemens Buchacher <drizzd@aon.at> | 2011-09-03 19:06:13 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-09-12 17:00:23 -0700 |
commit | c5978246f042967098d7e91b8355c9683a0f3d3c (patch) | |
tree | 51382fa786aec2698ecad621e83f744463e0482b /git-send-email.perl | |
parent | 4b5eac7f03f411f75087e0b6db23caa999624304 (diff) | |
download | git-c5978246f042967098d7e91b8355c9683a0f3d3c.tar.gz |
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>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-x | git-send-email.perl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl index 98ab33aae7..734356a6fb 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(); } |