@matheusbsbs / matheus-bagliano / commits / 8892048d51
Fork 0

send-email: find body-encoding correctly

In 8291db6 (git-send-email: add charset header if we add encoded 'From', 2007-11-16), "$1" is used from a regexp without using () to capture anything in $1. Later, when that value was used, it causes a warning about a variable being undefined, instead of using the correct value for comparison (not that it makes difference in the current code that does not do actual re-encoding). Signed-off-by: Peter Valdemar Mørch <peter@morch.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Peter Valdemar Mørch committed Jul 25, 2008 at 15:06 UTC 8892048d516fffab2000c2b47e006d8d8ebaa8c7
1 file changed +1 -1
git-send-email.perl
+1 -1
@@ -850,7 +850,7 @@ foreach my $t (@files) {
850 }
851 elsif (/^Content-type:/i) {
852 $has_content_type = 1;
853 - if (/charset="?[^ "]+/) {
853 + if (/charset="?([^ "]+)/) {
854 $body_encoding = $1;
855 }
856 push @xh, $_;