提交 8892048d 编写于 作者: P Peter Valdemar Mørch 提交者: Junio C Hamano

send-email: find body-encoding correctly

In 8291db6f (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: NPeter Valdemar Mørch <peter@morch.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 f5242ebf
......@@ -850,7 +850,7 @@ sub send_message
}
elsif (/^Content-type:/i) {
$has_content_type = 1;
if (/charset="?[^ "]+/) {
if (/charset="?([^ "]+)/) {
$body_encoding = $1;
}
push @xh, $_;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册