summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-05 19:36:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-10-05 19:36:23 (GMT)
commit3c18ee72cc2f3d0024b7314cdb1af5d41aea136a (patch)
treefde8b51362d9c1973fbed32ce1e1639f111f3d5b
parent6cf5b81f3236ddc3be9967dc59dc948efbfbbeea (diff)
parentc5978246f042967098d7e91b8355c9683a0f3d3c (diff)
downloadgit-3c18ee72cc2f3d0024b7314cdb1af5d41aea136a.zip
git-3c18ee72cc2f3d0024b7314cdb1af5d41aea136a.tar.gz
git-3c18ee72cc2f3d0024b7314cdb1af5d41aea136a.tar.bz2
Merge branch 'cb/send-email-help'
* cb/send-email-help: send-email: add option -h
-rwxr-xr-xgit-send-email.perl5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 98ab33a..734356a 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();
}