From: Peter Valdemar Mørch Date: Fri, 25 Jul 2008 13:06:48 +0000 (+0200) Subject: send-email: find body-encoding correctly X-Git-Tag: v1.6.0-rc1~39^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8892048d516fffab2000c2b47e006d8d8ebaa8c7;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-send-email.perl b/git-send-email.perl index 0b04ba32f..385ff7c21 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -850,7 +850,7 @@ foreach my $t (@files) { } elsif (/^Content-type:/i) { $has_content_type = 1; - if (/charset="?[^ "]+/) { + if (/charset="?([^ "]+)/) { $body_encoding = $1; } push @xh, $_;