> Junio C Hamano <gits...@pobox.com> writes
> Suffix "rgx" that means "regular expression" is a bit unusual, and
> also hard to read when squashed to another word.  Elsewhere in the
> same script, we seem to use $re_whatever to store precompiled
> regular expressions, so perhaps $re_comment, $re_quote, etc.?

Yes it's indeed a better name. I had not seen it, thanks!


> > +                if ($str_address ne "" && $str_phrase ne "") {
> > +                    $str_address = qq[<$str_address>];
> > +                }
> 
> We see both "git@vger.kernel.org" and "<git@vger.kernel.org>" around
> here for an address without comment or phrase; this chooses to turn
> them both into "<git@vger.kernel.org>" form?  Not a complaint but am
> thinking aloud to see if I am reading it correctly.

If there's no phrase, this will choose the "git@vger.kernel.org" form,
in both cases, because it'll be recognize as an address, $str_address
will be "git@vger.kernel.org" and $str_phrase will be empty before the
if ($str_address ne "" ...)
Here are some tests:

Input: <j...@example.com>
Split: j...@example.com
M::A : j...@example.com
----------
Input: j...@example.com
Split: j...@example.com
M::A : j...@example.com
----------
Input: Jane <j...@example.com>
Split: Jane <j...@example.com>
M::A : Jane <j...@example.com>
----------
Input: Jane Doe <j...@example.com>
Split: Jane Doe <j...@example.com>
M::A : Jane Doe <j...@example.com>
----------
Input: "Jane" <j...@example.com>
Split: "Jane" <j...@example.com>
M::A : "Jane" <j...@example.com>
----------
Input: "Doe, Jane" <j...@example.com>
Split: "Doe, Jane" <j...@example.com>
M::A : "Doe, Jane" <j...@example.com>

I've some more tests, maybe I should put them all in this post ?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to