summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2010-09-30 13:43:03 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-09-30 12:20:33 -0700
commitd5c7d69d0fa25f1b5df50e12280a622f28319f16 (patch)
treebb090978a228970be983ceaba3fe4012e1fe9ef9
parentsend-email: sanitize_address use $foo, not "$foo" (diff)
downloadtgif-d5c7d69d0fa25f1b5df50e12280a622f28319f16.tar.xz
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 <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>
-rwxr-xr-xgit-send-email.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 1bf090a881..c012b95560 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";