git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-send-email: Add --suppress-cc all

From
JBJoel Becker <joel.becker@oracle.com>
Date
Dec 24, 2007, 21:59 UTC
Message-ID
<20071224215910.GK7242@mail.oracle.com>
In-Reply-To
<20071224212648.GA21070@old.davidb.org>
On Mon, Dec 24, 2007 at 01:26:48PM -0800, David Brown wrote:
> Add the 'all' option to --suppress-cc, allowing easier suppression of
> everything.
	Thank you!
Show 60 quoted lines
>
> 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
>
-- 
"Can any of you seriously say the Bill of Rights could get through
 Congress today?  It wouldn't even get out of committee."
	- F. Lee Bailey

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
Previous: David BrownNext: David Brown
Message 11 of 17 in “git-send-email: Add --suppress-all-from option.”
  1. git-send-email: Add --suppress-all-from option.David Brown, Dec 21, 2007
  2. Joel BeckerDec 21, 2007
  3. Brian SwetlandDec 21, 2007
  4. Junio C HamanoDec 21, 2007
  5. Joel BeckerDec 21, 2007
  6. Theodore TsoDec 22, 2007
  7. David BrownDec 21, 2007
  8. git-send-email: Generalize auto-cc recipient mechanism.David Brown, Dec 24, 2007
  9. Joel BeckerDec 24, 2007
  10. git-send-email: Add --suppress-cc allDavid Brown, Dec 24, 2007
  11. Joel BeckerDec 24, 2007
  12. git-send-email: Generalize auto-cc recipient mechanism.David Brown, Dec 24, 2007
  13. Junio C HamanoDec 25, 2007
  14. David BrownDec 26, 2007
  15. git-send-email: Generalize auto-cc recipient mechanism.David Brown, Dec 26, 2007
  16. SeanDec 26, 2007
  17. David BrownDec 26, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.