From: Ævar Arnfjörð Bjarmason Date: Thu, 30 Sep 2010 13:43:03 +0000 (+0000) Subject: send-email: sanitize_address use qq["foo"], not "\"foo\"" X-Git-Tag: v1.7.4-rc0~160^2~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d5c7d69d0fa25f1b5df50e12280a622f28319f16;p=git.git send-email: sanitize_address use qq["foo"], not "\"foo\"" Perl provides an alternate quote syntax which can make using "" inside interpolated strings easier to read. Signed-off-by: Ævar Arnfjörð Bjarmason Reviewed-by: Jeff King > Signed-off-by: Junio C Hamano --- diff --git a/git-send-email.perl b/git-send-email.perl index 1bf090a88..c012b9556 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -881,7 +881,7 @@ sub sanitize_address { # double quotes are needed if specials or CTLs are included elsif ($recipient_name =~ /[][()<>@,;:\\".\000-\037\177]/) { $recipient_name =~ s/(["\\\r])/\\$1/g; - $recipient_name = "\"$recipient_name\""; + $recipient_name = qq["$recipient_name"]; } return "$recipient_name $recipient_addr";