]> git.ipfire.org Git - thirdparty/git.git/commitdiff
send-email: sanitize_address use qq["foo"], not "\"foo\""
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 30 Sep 2010 13:43:03 +0000 (13:43 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Sep 2010 19:20:33 +0000 (12:20 -0700)
Perl provides an alternate quote syntax which can make using "" inside
interpolated strings easier to read.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl

index 1bf090a881831e86148aee857e307f762a2f8924..c012b95560bcc5335c5476c11880fefe9ef8fc66 100755 (executable)
@@ -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;
        # 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";
        }
 
        return "$recipient_name $recipient_addr";