git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Brown <git@davidb.org>
To: Joel Becker <Joel.Becker@oracle.com>
Cc: git@vger.kernel.org
Subject: [PATCH] git-send-email: Add --suppress-cc all
Date: Mon, 24 Dec 2007 13:26:48 -0800	[thread overview]
Message-ID: <20071224212648.GA21070@old.davidb.org> (raw)
In-Reply-To: <20071224210325.GA7242@mail.oracle.com>

Add the 'all' option to --suppress-cc, allowing easier suppression of
everything.

Signed-off-by: David Brown <git@davidb.org>
---
On Mon, Dec 24, 2007 at 01:03:25PM -0800, Joel Becker wrote:

>+   all    - all of the above, thus only honoring '--to', '--cc', and
>             '--bcc'

I can squash this with the other patch if that would be cleaner.

Dave

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

diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 432f336..fdfb56e 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -125,7 +125,7 @@ The --cc option must be repeated for each user you want on the cc list.
  	avoid including the patch author, 'cc' will avoid including anyone
  	mentioned in Cc lines in the patch, 'sob' will avoid including
  	anyone mentioned in Signed-off-by lines, and 'cccmd' will avoid
-	running the --cc-cmd.
+	running the --cc-cmd.  'all' will suppress all auto cc values.
  	Default is the value of 'sendemail.suppresscc' configuration value;
  	if that is unspecified, default to 'self' if --suppress-from is
  	specified, as well as 'sob' if --no-signed-off-cc is specified.
diff --git a/git-send-email.perl b/git-send-email.perl
index cb9adf2..ef16824 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -275,7 +275,7 @@ my(%suppress_cc);
  if (@suppress_cc) {
  	foreach my $entry (@suppress_cc) {
  		die "Unknown --suppress-cc field: '$entry'\n"
-			unless $entry =~ /^(cccmd|cc|author|self|sob)$/;
+			unless $entry =~ /^(all|cccmd|cc|author|self|sob)$/;
  		$suppress_cc{$entry} = 1;
  	}
  } else {
@@ -284,6 +284,15 @@ if (@suppress_cc) {
  	$suppress_cc{'sob'} = 1 unless $signed_off_cc;
  }
  
+if ($suppress_cc{'all'}) {
+	foreach my $entry (qw (ccmd cc author self sob)) {
+		$suppress_cc{$entry} = 1;
+	}
+	delete $suppress_cc{'all'};
+}
+
+printf "Suppressions: %s\n", join(',', keys(%suppress_cc));
+
  my ($repoauthor) = $repo->ident_person('author');
  my ($repocommitter) = $repo->ident_person('committer');
  
-- 
1.5.3.7

  reply	other threads:[~2007-12-24 21:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-21  6:01 [PATCH] git-send-email: Add --suppress-all-from option David Brown
2007-12-21 11:05 ` Joel Becker
2007-12-21 11:14 ` Brian Swetland
2007-12-21 17:43 ` Junio C Hamano
2007-12-21 19:21   ` Joel Becker
2007-12-22  0:55     ` Theodore Tso
2007-12-21 22:37   ` David Brown
2007-12-24 19:01 ` [PATCH] git-send-email: Generalize auto-cc recipient mechanism David Brown
2007-12-24 21:03   ` Joel Becker
2007-12-24 21:26     ` David Brown [this message]
2007-12-24 21:59       ` [PATCH] git-send-email: Add --suppress-cc all Joel Becker
2007-12-24 21:36 ` [PATCH] git-send-email: Generalize auto-cc recipient mechanism David Brown
2007-12-25 21:04   ` Junio C Hamano
2007-12-26  3:39     ` David Brown
2007-12-26  3:56     ` David Brown
2007-12-26  4:54       ` Sean
2007-12-26  5:32         ` David Brown

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=20071224212648.GA21070@old.davidb.org \
    --to=git@davidb.org \
    --cc=Joel.Becker@oracle.com \
    --cc=git@vger.kernel.org \
    /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).