Skip to content

Commit

Permalink
send-email: find body-encoding correctly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Valdemar Mørch authored and Junio C Hamano committed Jul 25, 2008
1 parent f5242eb commit 8892048
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ sub send_message
}
elsif (/^Content-type:/i) {
$has_content_type = 1;
if (/charset="?[^ "]+/) {
if (/charset="?([^ "]+)/) {
$body_encoding = $1;
}
push @xh, $_;
Expand Down

0 comments on commit 8892048

Please sign in to comment.