git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-send-email: fix handling of special characters
Date: Fri, 24 May 2013 00:38:08 +0300	[thread overview]
Message-ID: <20130523213808.GA1327@redhat.com> (raw)
In-Reply-To: <7vtxltcrog.fsf@alter.siamese.dyndns.org>

On Thu, May 23, 2013 at 02:27:59PM -0700, Junio C Hamano wrote:
> "Michael S. Tsirkin" <mst@redhat.com> writes:
> 
> >> Is $author already sanitized at this point in the code?  I see it
> >> was unwrapped with unquote_rfc2047 after it was read from the From:
> >> line; will it always be the same as sanitize_address($author) would
> >> return, and if not, would you rather compare between sanitized
> >> versions of sender and author, no?
> >
> > Yes. I'll have to look at the code more closely.
> > In my testing author here is "Michael S. Tsirkin" <mst@redhat.com>
> > so it matches the sanitized sender.
> > Of course that's because my name does not have non-ascii,
> > just a dot.
> 
> So the conclusion is that the logic to see if the names are the same
> needs a bit more work than what was posted, I think?

I think so. And a bit more testing with non-ASCII.
Plan to look into this around Sunday if no one beats me
to it.

> >> Also, isn't the $sender the same during the whole outer loop that
> >> iterates over @files?  Do we need to apply sanitize_address() on it
> >> over and over for each and every logical line in the @header?
> >> 
> >> This comment also applies to the other patch but they probably
> >> should become a single patch anyway, I guess?
> >
> > OK so now you are ok with this last bit, right?
> 
> Sorry, but I am not sure what you are asking.
> 
> Do I think the assignment to $sanitized_sender can and should be
> done just once, not once per file, if the code inspection tells us
> that $sender is a constant inside the foreach (@files) loop?
> 
> Do I think these two are solving pretty much the same thing and is
> better to be done in a single patch?  
> 
> I didn't really think them through when I responded, but now after
> you made me think, I would say the answers to both of them are yes.

      reply	other threads:[~2013-05-23 21:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-23 13:54 [PATCH] git-send-email: fix handling of special characters Michael S. Tsirkin
2013-05-23 19:52 ` Junio C Hamano
2013-05-23 19:56   ` Junio C Hamano
2013-05-23 21:19   ` Michael S. Tsirkin
2013-05-23 21:27     ` Junio C Hamano
2013-05-23 21:38       ` Michael S. Tsirkin [this message]

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=20130523213808.GA1327@redhat.com \
    --to=mst@redhat.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).