Re: [PATCH v6] gitweb: redacted e-mail addresses feature.
To
Ævar Arnfjörð Bjarmason
Cc
Georgios Kontaxis via GitGitGadget
git@vger.kernel.org
brian m. carlson
Georgios Kontaxis
From
Junio C Hamano
See Also
Prev Ref 1 Ref 2
Date
2021-04-08 22:51:32 UTC
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

>> +sub hide_mailaddrs_if_private {
>> +	my $line = shift;
>> +	return $line unless gitweb_check_feature('email-privacy');
>> +	$line =~ s/<[^@>]+@[^>]+>/<redacted>/ig;
>
> The /i here is redundant, since you have nothing that'll case-fold on
> the LHS of the s///, doesn't harm anything either. Just a small note
> since it's new in v6...

True.  If it were left original version that was suggested during
the review, e.g.

	s/<[^@]+@[-.a-z0-9]+>/<red@cted>/ig;

the /i/ would have been needed, but without the "after the @-sign
should be a run of DNS-valid characters", I agree that there is no
need.

Thanks.  Will locally tweak.