public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "Michael S. Tsirkin" <mst@redhat•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] git-send-email: fix handling of special characters
Date: Thu, 23 May 2013 14:27:59 -0700	[thread overview]
Message-ID: <7vtxltcrog.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20130523211954.GD31421@redhat.com> (Michael S. Tsirkin's message of "Fri, 24 May 2013 00:19:54 +0300")

"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?

>> 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:28 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 [this message]
2013-05-23 21:38       ` Michael S. Tsirkin

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=7vtxltcrog.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=mst@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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