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

Re: [PATCH v2 2/6] send-email: fix suppress-cc=self on cccmd

From
MTMichael S. Tsirkin <mst@redhat.com>
Date
Jun 3, 2013, 16:15 UTC
Message-ID
<20130603161556.GA16750@redhat.com>
In-Reply-To
<7v7gibjieh.fsf@alter.siamese.dyndns.org>
On Mon, Jun 03, 2013 at 08:58:14AM -0700, Junio C Hamano wrote:
Show 38 quoted lines
> "Michael S. Tsirkin" <mst@redhat.com> writes:
> 
> > When cccmd is used, old-style suppress-from filter
> > is applied by the newer suppress-cc=self isn't.
> > Fix this up.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> >  git-send-email.perl | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/git-send-email.perl b/git-send-email.perl
> > index bd13cc8..a138615 100755
> > --- a/git-send-email.perl
> > +++ b/git-send-email.perl
> > @@ -1462,7 +1462,7 @@ sub recipients_cmd {
> >  		$address =~ s/^\s*//g;
> >  		$address =~ s/\s*$//g;
> >  		$address = sanitize_address($address);
> > -		next if ($address eq $sanitized_sender and $suppress_from);
> > +		next if ($address eq $sender and $suppress_cc{'self'});
> 
> If $suppress_from is defined, $suppress_cc{'self'} gets its value,
> so the latter half of this change is very understandable.
> 
> The original comparison uses $address that is "sanitized" (whose
> definition is roughly "mangled/quoted with rfc2047 etc to fit on
> To/Cc headers") against $sanitized_sender, which means for a
> 
>     $sender = 'Michael S. Tsirkin <mst@redhat.com>';
> 
> we used
> 
>     $sanitized_sender = '"Michael S. Tsirkin" <mst@redhat.com>';
> 
> for comparison, but the new code does not quote the $recipient_name
> part inside dq for the single dot after the middle name.  Is this a
> desirable change?

What I tried to do here is split the changes to small chunks and I picked a chunk of a later patch in an earlier one by mistake.

So this is fixed up by patch 4/6 in the series, which redefines sender to have the sanitized value, everywhere.

I guess I'll have to repost moving this former chunk to patch 4.

> >  		push @addresses, $address;
> >  		printf("($prefix) Adding %s: %s from: '%s'\n",
> >  		       $what, $address, $cmd) unless $quiet;
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 18 in “git send-email suppress-cc=self fixes”
  1. 0/6 git send-email suppress-cc=self fixesMichael S. Tsirkin, May 30, 2013
  2. 1/6 t/send-email.sh: add test for suppress-cc=selfMichael S. Tsirkin, May 30, 2013
  3. Junio C HamanoJun 3, 2013
  4. 2/6 send-email: fix suppress-cc=self on cccmdMichael S. Tsirkin, May 30, 2013
  5. Junio C HamanoJun 3, 2013
  6. Michael S. TsirkinJun 3, 2013
  7. Junio C HamanoJun 3, 2013
  8. Michael S. TsirkinJun 3, 2013
  9. Junio C HamanoJun 3, 2013
  10. 3/6 t/send-email: test suppress-cc=self on cccmdMichael S. Tsirkin, May 30, 2013
  11. 4/6 send-email: make --suppress-cc=self sanitize inputMichael S. Tsirkin, May 30, 2013
  12. Junio C HamanoJun 3, 2013
  13. Michael S. TsirkinJun 3, 2013
  14. Junio C HamanoJun 3, 2013
  15. 5/6 t/send-email: add test with quoted senderMichael S. Tsirkin, May 30, 2013
  16. 6/6 t/send-email: test suppress-cc=self with non-asciiMichael S. Tsirkin, May 30, 2013
  17. Junio C HamanoJun 3, 2013
  18. Michael S. TsirkinJun 3, 2013

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.