All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Becker <Joel.Becker@oracle.com>
To: David Brown <git@davidb.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-send-email: Add --suppress-all-from option.
Date: Fri, 21 Dec 2007 03:05:32 -0800	[thread overview]
Message-ID: <20071221110532.GG18627@ca-server1.us.oracle.com> (raw)
In-Reply-To: <1198216860-487-1-git-send-email-git@davidb.org>

On Thu, Dec 20, 2007 at 10:01:00PM -0800, David Brown wrote:
> Sometimes, it is useful to be able to send a patch to a third party
s/Sometimes/Most of the time/g

> without the author of the patch being copied on the message.  An
> common example would be an internal discussion at a company to ask if
> a particular patch should be applied.  Some environments may even have
> policy against such mail being sent outside of the company.
> 
> Add the --suppress-all-from/--no-suppress-all-from options to avoid
> sending patches to the patch author, even if different from the
> sender.  Add the sendemail.suppressallfrom config option to allow this
> to have a different default.
> 
> Signed-off-by: David Brown <git@davidb.org>
Please-dog-yes: Joel Becker <jlbec@evilplan.org>

> ---
>  Documentation/git-send-email.txt |    7 +++++++
>  git-send-email.perl              |    9 ++++++++-
>  2 files changed, 15 insertions(+), 1 deletions(-)
> 
> diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
> index f0bd285..5d06264 100644
> --- a/Documentation/git-send-email.txt
> +++ b/Documentation/git-send-email.txt
> @@ -117,6 +117,13 @@ The --cc option must be repeated for each user you want on the cc list.
>          Default is the value of 'sendemail.suppressfrom' configuration value;
>          if that is unspecified, default to --no-suppress-from.
>  
> +--suppress-all-from, --no-suppress-all-from::
> +        If this is set, do not add the From: address to the cc: list,
> +        even if it is different than the person sending the email.
> +        Default is the value of the 'sendemail.suppressallfrom'
> +        configuration value; if that is unspecified, default to
> +        -no-suppress-all-from.
> +
>  --thread, --no-thread::
>  	If this is set, the In-Reply-To header will be set on each email sent.
>  	If disabled with "--no-thread", no emails will have the In-Reply-To
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 248d035..80265b5 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -90,6 +90,9 @@ Options:
>  
>     --suppress-from Suppress sending emails to yourself. Defaults to off.
>  
> +   --suppress-all-from Never automatically send to a patch author.
> +                  Defaults to off.
> +
>     --thread       Specify that the "In-Reply-To:" header should be set on all
>                    emails. Defaults to on.
>  
> @@ -174,7 +177,8 @@ if ($@) {
>  my ($quiet, $dry_run) = (0, 0);
>  
>  # Variables with corresponding config settings
> -my ($thread, $chain_reply_to, $suppress_from, $signed_off_cc, $cc_cmd);
> +my ($thread, $chain_reply_to, $suppress_from, $suppress_all_from);
> +my ($signed_off_cc, $cc_cmd);
>  my ($smtp_server, $smtp_server_port, $smtp_authuser, $smtp_authpass, $smtp_ssl);
>  my ($identity, $aliasfiletype, @alias_files, @smtp_host_parts);
>  
> @@ -182,6 +186,7 @@ my %config_bool_settings = (
>      "thread" => [\$thread, 1],
>      "chainreplyto" => [\$chain_reply_to, 1],
>      "suppressfrom" => [\$suppress_from, 0],
> +    "suppressallfrom" => [\$suppress_all_from, 0],
>      "signedoffcc" => [\$signed_off_cc, 1],
>      "smtpssl" => [\$smtp_ssl, 0],
>  );
> @@ -218,6 +223,7 @@ my $rc = GetOptions("sender|from=s" => \$sender,
>  		    "quiet" => \$quiet,
>  		    "cc-cmd=s" => \$cc_cmd,
>  		    "suppress-from!" => \$suppress_from,
> +		    "suppress-all-from!" => \$suppress_all_from,
>  		    "signed-off-cc|signed-off-by-cc!" => \$signed_off_cc,
>  		    "dry-run" => \$dry_run,
>  		    "envelope-sender=s" => \$envelope_sender,
> @@ -700,6 +706,7 @@ foreach my $t (@files) {
>  					$subject = $1;
>  
>  				} elsif (/^(Cc|From):\s+(.*)$/) {
> +					next if ($suppress_all_from);
>  					if (unquote_rfc2047($2) eq $sender) {
>  						next if ($suppress_from);
>  					}
> -- 
> 1.5.3.7
> 
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 

Life's Little Instruction Book #456

	"Send your loved one flowers.  Think of a reason later."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127

  reply	other threads:[~2007-12-21 11:06 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 [this message]
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     ` [PATCH] git-send-email: Add --suppress-cc all David Brown
2007-12-24 21:59       ` 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=20071221110532.GG18627@ca-server1.us.oracle.com \
    --to=joel.becker@oracle.com \
    --cc=git@davidb.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.