wildmatch: make wildmatch's return value compatible with fnmatch
[gitweb.git] / git-send-email.perl
index ef30c557c7dee549e891fe7605902ba58d0566a3..664713709c0b6e6e4974faa8f0800df2f0beb8e5 100755 (executable)
@@ -862,11 +862,13 @@ sub make_message_id {
 sub unquote_rfc2047 {
        local ($_) = @_;
        my $encoding;
-       if (s/=\?([^?]+)\?q\?(.*)\?=/$2/g) {
+       s{=\?([^?]+)\?q\?(.*?)\?=}{
                $encoding = $1;
-               s/_/ /g;
-               s/=([0-9A-F]{2})/chr(hex($1))/eg;
-       }
+               my $e = $2;
+               $e =~ s/_/ /g;
+               $e =~ s/=([0-9A-F]{2})/chr(hex($1))/eg;
+               $e;
+       }eg;
        return wantarray ? ($_, $encoding) : $_;
 }