git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Unleashed" <unledev@gmail.com>
To: "felipebalbi@users.sourceforge.net"  <felipebalbi@users.sourceforge.net>
Cc: git@vger.kernel.org, ae@op5.se, "Felipe Balbi" <felipe.lima@indt.org.br>
Subject: Re: [PATCH] git-send-email: Add a --cc-nobody option
Date: Tue, 18 Sep 2007 14:50:10 +0200	[thread overview]
Message-ID: <5e4707340709180550w3211e95fqd9fd648aab8ce78a@mail.gmail.com> (raw)
In-Reply-To: <11901157221792-git-send-email-felipebalbi@users.sourceforge.net>

On 9/18/07, felipebalbi@users.sourceforge.net
<felipebalbi@users.sourceforge.net> wrote:
> From: Felipe Balbi <felipe.lima@indt.org.br>
>
> This patch adds a --cc-nobody option to avoid sending emails
> to everybody but the ones listed by --to option.
>
> Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br>

I wrote a similar patch a couple months ago, but they differ slightly,
maybe the code has changed somewhat:
http://marc.info/?l=git&m=118200193310898&w=2

--cc-nobody sounds better to me.

>                                 } elsif (/^(Cc|From):\s+(.*)$/) {
> -                                       if (unquote_rfc2047($2) eq $sender) {
> -                                               next if ($suppress_from);
> +                                       if (unquote_rfc2047($2)) {
> +                                               next if ($cc_nobody);
> +                                       }
> +                                       elsif (unquote_rfc2047($2) eq $sender) {
> +                                               next if ($suppress_from|$cc_nobody);
>                                         }
>                                         elsif ($1 eq 'From') {
>                                                 $author = unquote_rfc2047($2);

Here you could probably skip the whole branch if you check $cc_nobody
first of all.

> @@ -707,7 +715,7 @@ foreach my $t (@files) {
>                         }
>                 } else {
>                         $message .=  $_;
> -                       if (/^(Signed-off-by|Cc): (.*)$/i && $signed_off_cc) {
> +                       if (/^(Signed-off-by|Cc): (.*)$/i && $signed_off_cc && !$cc_nobody) {

Minor, but almost the same here.

Alex

  parent reply	other threads:[~2007-09-18 12:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-18 11:42 [PATCH] git-send-email: Add a --cc-nobody option felipebalbi
2007-09-18 11:49 ` Andreas Ericsson
2007-09-18 11:51   ` Felipe Balbi
2007-09-18 12:50 ` Alex Unleashed [this message]
2007-09-18 13:01   ` Felipe Balbi

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=5e4707340709180550w3211e95fqd9fd648aab8ce78a@mail.gmail.com \
    --to=unledev@gmail.com \
    --cc=ae@op5.se \
    --cc=felipe.lima@indt.org.br \
    --cc=felipebalbi@users.sourceforge.net \
    --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).