@matheusbsbs / matheus-bagliano / commits / 0d290a4634
Fork 0

send-email: use \E***\Q instead of \*\*\*

Change the regex introduced in a03bc5b to use the \E...\Q escape syntax instead of using backslashes. It's more readable like this, and easier to grep for. 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>

Ævar Arnfjörð Bjarmason committed Sep 30, 2010 at 13:43 UTC 0d290a46346f465a735bf50244d033e2257b0326
1 file changed +1 -1
git-send-email.perl
+1 -1
@@ -705,7 +705,7 @@ if (!defined $auto_8bit_encoding && scalar %broken_encoding) {
705
706 if (!$force) {
707 for my $f (@files) {
708 - if (get_patch_subject($f) =~ /\*\*\* SUBJECT HERE \*\*\*/) {
708 + if (get_patch_subject($f) =~ /\Q*** SUBJECT HERE ***\E/) {
709 die "Refusing to send because the patch\n\t$f\n"
710 . "has the template subject '*** SUBJECT HERE ***'. "
711 . "Pass --force if you really want to send.\n";