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

Re: [PATCH] git-send-email: Add a --cc-nobody option

From
FBFelipe Balbi <felipebalbi@users.sourceforge.net>
Date
Sep 18, 2007, 13:01 UTC
Message-ID
<31e679430709180601h15d0d315ub13bfd2c6763f181@mail.gmail.com>
In-Reply-To
<5e4707340709180550w3211e95fqd9fd648aab8ce78a@mail.gmail.com>
hi,
On 9/18/07, Alex Unleashed <unledev@gmail.com> wrote:
Show 29 quoted lines
> 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.

Yeah, I tested this one too but when sending emails I was changing all those From lines to my address, which means every mail I was sending the patch would take my authorship.

So it looked better guaranteeing the authorship
Show 9 quoted lines
>
> > @@ -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.
sanity
>
> Alex
>
-- 
Best Regards,

Felipe Balbi
felipebalbi@users.sourceforge.net
Previous: Alex Unleashed
Message 5 of 5 in “git-send-email: Add a --cc-nobody option”
  1. git-send-email: Add a --cc-nobody optionfelipebalbi@users.sourceforge.net, Sep 18, 2007
  2. Andreas EricssonSep 18, 2007
  3. Felipe BalbiSep 18, 2007
  4. Alex UnleashedSep 18, 2007
  5. Felipe BalbiSep 18, 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.