git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] send-email: add option -h
@ 2011-09-03 17:06 Clemens Buchacher
  2011-09-05 20:08 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Clemens Buchacher @ 2011-09-03 17:06 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Most other git commands print a synopsis when passed -h. Make
send-email do the same.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
 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 98ab33a..4ac6931 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("help|H|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();
 }
-- 
1.7.6.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-06 16:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-03 17:06 [PATCH] send-email: add option -h Clemens Buchacher
2011-09-05 20:08 ` Junio C Hamano
2011-09-06  6:32   ` Clemens Buchacher
2011-09-06 16:04     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).