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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

On 9/18/07, Alex Unleashed <unledev@xxxxxxxxx> wrote:
> On 9/18/07, felipebalbi@xxxxxxxxxxxxxxxxxxxxx
> <felipebalbi@xxxxxxxxxxxxxxxxxxxxx> wrote:
> > From: Felipe Balbi <felipe.lima@xxxxxxxxxxx>
> >
> > 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@xxxxxxxxxxx>
>
> 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

>
> > @@ -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@xxxxxxxxxxxxxxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux