git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alejandro R. Sedeño" <asedeno@MIT.EDU>
To: git@vger.kernel.org
Cc: Thomas Rast <trast@student.ethz.ch>
Subject: [PATCH 2/2] git-send-email: Add some short options
Date: Fri, 10 Dec 2010 13:44:16 -0500	[thread overview]
Message-ID: <1292006656-1264-3-git-send-email-asedeno@mit.edu> (raw)
In-Reply-To: <1291869878-19645-1-git-send-email-asedeno@mit.edu>

* Accept -n as a synonym for --dry-run
* Accept -f as a synonym for --force
* Accept -q as a synonym for --quiet

Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
---
 Documentation/git-send-email.txt |    3 +++
 git-send-email.perl              |   12 ++++++------
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 7ec9dab..2d0faf2 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -297,6 +297,7 @@ Default is the value of 'sendemail.confirm' configuration value; if that
 is unspecified, default to 'auto' unless any of the suppress options
 have been specified, in which case default to 'compose'.
 
+-n::
 --dry-run::
 	Do everything except actually send the emails.
 
@@ -306,6 +307,7 @@ have been specified, in which case default to 'compose'.
 	or as a file name ('--no-format-patch'). By default, when such a conflict
 	occurs, git send-email will fail.
 
+-q::
 --quiet::
 	Make git-send-email less verbose.  One line per email should be
 	all that is output.
@@ -322,6 +324,7 @@ have been specified, in which case default to 'compose'.
 Default is the value of 'sendemail.validate'; if this is not set,
 default to '--validate'.
 
+-f::
 --force::
 	Send emails even if safety checks would prevent it.
 
diff --git a/git-send-email.perl b/git-send-email.perl
index 76565de..ede7835 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -84,12 +84,12 @@ git send-email [options] <file | directory | rev-list options >
   Administering:
     --confirm               <str>  * Confirm recipients before sending;
                                      auto, cc, compose, always, or never.
-    --quiet                        * Output one line of info per email.
-    --dry-run                      * Don't actually send the emails.
+    -q, --quiet                    * Output one line of info per email.
+    -n, --dry-run                  * Don't actually send the emails.
     --[no-]validate                * Perform patch sanity checks. Default on.
     --[no-]format-patch            * understand any non optional arguments as
                                      `git format-patch` ones.
-    --force                        * Send even if safety checks would prevent it.
+    -f, --force                    * Send even if safety checks would prevent it.
 
 EOT
 	exit(1);
@@ -298,19 +298,19 @@ my $rc = GetOptions("sender|from=s" => \$sender,
 		    "identity=s" => \$identity,
 		    "annotate" => \$annotate,
 		    "compose" => \$compose,
-		    "quiet" => \$quiet,
+		    "quiet|q" => \$quiet,
 		    "cc-cmd=s" => \$cc_cmd,
 		    "suppress-from!" => \$suppress_from,
 		    "suppress-cc=s" => \@suppress_cc,
 		    "signed-off-cc|signed-off-by-cc!" => \$signed_off_by_cc,
 		    "confirm=s" => \$confirm,
-		    "dry-run" => \$dry_run,
+		    "dry-run|n" => \$dry_run,
 		    "envelope-sender=s" => \$envelope_sender,
 		    "thread!" => \$thread,
 		    "validate!" => \$validate,
 		    "format-patch!" => \$format_patch,
 		    "8bit-encoding=s" => \$auto_8bit_encoding,
-		    "force" => \$force,
+		    "force|f" => \$force,
 	 );
 
 unless ($rc) {
-- 
1.7.3.3

      parent reply	other threads:[~2010-12-10 18:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09  4:44 [PATCH] git-send-email: Accept -n as a synonym for --dry-run Alejandro R. Sedeño
2010-12-09  6:39 ` "Alejandro R. Sedeño"
2010-12-09 13:35 ` Thomas Rast
2010-12-09 16:21   ` "Alejandro R. Sedeño"
2010-12-10 18:44 ` git-send-email: add some short options and update documentation Alejandro R. Sedeño
2010-12-13 20:12   ` "Alejandro R. Sedeño"
2010-12-13 21:47     ` Junio C Hamano
2010-12-10 18:44 ` [PATCH 1/2] Add --force to git-send-email documentation Alejandro R. Sedeño
2010-12-10 18:44 ` Alejandro R. Sedeño [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1292006656-1264-3-git-send-email-asedeno@mit.edu \
    --to=asedeno@mit.edu \
    --cc=git@vger.kernel.org \
    --cc=trast@student.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).