git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] git-send-email: Accept -n as a synonym for --dry-run
@ 2010-12-09  4:44 Alejandro R. Sedeño
  2010-12-09  6:39 ` "Alejandro R. Sedeño"
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Alejandro R. Sedeño @ 2010-12-09  4:44 UTC (permalink / raw)
  To: git

git-send-email is not currently using -n for anything else, and it
seems unlikely we will want to use it to mean anything else in the
future, so add it as an alias for convenience.

Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
---
 git-send-email.perl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index 76565de..7e3df9a 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -85,7 +85,7 @@ git send-email [options] <file | directory | rev-list options >
     --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.
+    -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.
@@ -304,7 +304,7 @@ my $rc = GetOptions("sender|from=s" => \$sender,
 		    "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,
-- 
1.7.3.3

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

* Re: [PATCH] git-send-email: Accept -n as a synonym for --dry-run
  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
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: "Alejandro R. Sedeño" @ 2010-12-09  6:39 UTC (permalink / raw)
  To: git

I noticed I forgot to make the corresponding documentation change. I'll
include it in the next version of this patch, though I'm waiting to see
if there's any other feedback first.

-Alejandro

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

* Re: [PATCH] git-send-email: Accept -n as a synonym for --dry-run
  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
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Thomas Rast @ 2010-12-09 13:35 UTC (permalink / raw)
  To: Alejandro R. Sedeño; +Cc: git

Alejandro R. Sedeño wrote:
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 76565de..7e3df9a 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -85,7 +85,7 @@ git send-email [options] <file | directory | rev-list options >
>      --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.
> +    -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.

Good change by itself, but this is the first short option for
git-send-email.  Maybe --force should also get its analogous -f alias?
Any others?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

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

* Re: [PATCH] git-send-email: Accept -n as a synonym for --dry-run
  2010-12-09 13:35 ` Thomas Rast
@ 2010-12-09 16:21   ` "Alejandro R. Sedeño"
  0 siblings, 0 replies; 9+ messages in thread
From: "Alejandro R. Sedeño" @ 2010-12-09 16:21 UTC (permalink / raw)
  To: Thomas Rast; +Cc: git

On 12/09/2010 08:35 AM, Thomas Rast wrote:
> Alejandro R. Sedeño wrote:
>> diff --git a/git-send-email.perl b/git-send-email.perl
>> index 76565de..7e3df9a 100755
>> --- a/git-send-email.perl
>> +++ b/git-send-email.perl
>> @@ -85,7 +85,7 @@ git send-email [options] <file | directory | rev-list options >
>>      --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.
>> +    -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.
> 
> Good change by itself, but this is the first short option for
> git-send-email.  Maybe --force should also get its analogous -f alias?
> Any others?

Sounds good to me, though I notice that --force isn't in git-send-email's
documentation at all.

If we're expanding this patch[set] to include other short options, -q for
--quiet makes sense to me as well.

Other suggestions?

-Alejandro

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

* git-send-email: add some short options and update documentation
  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-10 18:44 ` Alejandro R. Sedeño
  2010-12-13 20:12   ` "Alejandro R. Sedeño"
  2010-12-10 18:44 ` [PATCH 1/2] Add --force to git-send-email documentation Alejandro R. Sedeño
  2010-12-10 18:44 ` [PATCH 2/2] git-send-email: Add some short options Alejandro R. Sedeño
  4 siblings, 1 reply; 9+ messages in thread
From: Alejandro R. Sedeño @ 2010-12-10 18:44 UTC (permalink / raw)
  To: git; +Cc: Thomas Rast

Add short options that were mentioned in the thread to git-send-email,
specifically:

-n for --dry-run
-f for --force
-q for --quiet

Since --force didn't have documentation in
Documentation/git-send-email.txt, a separate commit adds some
first.

[PATCH 1/2] Add --force to git-send-email documentation
[PATCH 2/2] git-send-email: Add some short options

Documentation/git-send-email.txt |    6 ++++++
git-send-email.perl              |   12 ++++++------
2 files changed, 12 insertions(+), 6 deletions(-)

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

* [PATCH 1/2] Add --force to git-send-email documentation
  2010-12-09  4:44 [PATCH] git-send-email: Accept -n as a synonym for --dry-run Alejandro R. Sedeño
                   ` (2 preceding siblings ...)
  2010-12-10 18:44 ` git-send-email: add some short options and update documentation Alejandro R. Sedeño
@ 2010-12-10 18:44 ` Alejandro R. Sedeño
  2010-12-10 18:44 ` [PATCH 2/2] git-send-email: Add some short options Alejandro R. Sedeño
  4 siblings, 0 replies; 9+ messages in thread
From: Alejandro R. Sedeño @ 2010-12-10 18:44 UTC (permalink / raw)
  To: git; +Cc: Thomas Rast

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

diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index ebc024a..7ec9dab 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -322,6 +322,9 @@ have been specified, in which case default to 'compose'.
 Default is the value of 'sendemail.validate'; if this is not set,
 default to '--validate'.
 
+--force::
+	Send emails even if safety checks would prevent it.
+
 
 CONFIGURATION
 -------------
-- 
1.7.3.3

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

* [PATCH 2/2] git-send-email: Add some short options
  2010-12-09  4:44 [PATCH] git-send-email: Accept -n as a synonym for --dry-run Alejandro R. Sedeño
                   ` (3 preceding siblings ...)
  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
  4 siblings, 0 replies; 9+ messages in thread
From: Alejandro R. Sedeño @ 2010-12-10 18:44 UTC (permalink / raw)
  To: git; +Cc: Thomas Rast

* 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

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

* Re: git-send-email: add some short options and update documentation
  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
  0 siblings, 1 reply; 9+ messages in thread
From: "Alejandro R. Sedeño" @ 2010-12-13 20:12 UTC (permalink / raw)
  To: "Alejandro R. Sedeño"; +Cc: git, Thomas Rast, Junio C Hamano

On 12/10/2010 01:44 PM, Alejandro R. Sedeño wrote:
> Add short options that were mentioned in the thread to git-send-email,
> specifically:
> 
> -n for --dry-run
> -f for --force
> -q for --quiet
> 
> Since --force didn't have documentation in
> Documentation/git-send-email.txt, a separate commit adds some
> first.
> 
> [PATCH 1/2] Add --force to git-send-email documentation

I see this has been pulled into master. Thanks, Junio.

> [PATCH 2/2] git-send-email: Add some short options

Any more comments on this?

-Alejandro

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

* Re: git-send-email: add some short options and update documentation
  2010-12-13 20:12   ` "Alejandro R. Sedeño"
@ 2010-12-13 21:47     ` Junio C Hamano
  0 siblings, 0 replies; 9+ messages in thread
From: Junio C Hamano @ 2010-12-13 21:47 UTC (permalink / raw)
  To: Alejandro R. Sedeño; +Cc: git, Thomas Rast, Junio C Hamano

"Alejandro R. Sedeño" <asedeno@mit.edu> writes:

>> [PATCH 2/2] git-send-email: Add some short options
>
> Any more comments on this?

Not from me, other than that I am not overly interested myself.

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

end of thread, other threads:[~2010-12-13 21:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 2/2] git-send-email: Add some short options Alejandro R. Sedeño

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).