Re: [PATCH v4] gitweb: redacted e-mail addresses feature.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 28, 2021, 22:35 UTC
- Message-ID
- <xmqqft0elxei.fsf@gitster.g>
- In-Reply-To
- <14ebc48b8b7bee23dbcf19942f1f9029.squirrel@mail.kodaksys.org>
"Georgios Kontaxis" <geko1702+commits@99rst.org> writes:
> It's not clear if you think it's overkill because we have to depend on an > external module or because we don't need accurate parsing.
It is neither; what we need to parse is not exactly 'e-mail addresses' as known to Mail::Address.
The thing is, unlike send-email that needs to interact with the real-world MTAs and e-mail addresses, the codepaths we are talking about are mostly about author/committer ident, where the definition is quite narrower than the Mail::Address's "has to cover all the possible ways to spell e-mail addresses under the sun" requirement.
Having said all that ...
> If we prefer accurate parsing but don't like depending on Mail::Address, > it's easy to write complete expressions ourselves. (In a separate, > internal, Perl module)
... I do not have strong opinions either way. I won't have the final say on the way things are done in Perl and what is done to Gitweb.
It was just that what I saw earlier with the offsets and manual parsing instead of s///g operator did not smell not like a Perl program to me, and the message you are responding to was my reaction to it.
Thanks.