@matheusbsbs / matheus-bagliano / commits / af068d2742
Fork 0

Change the scope of the $cc variable as it is not needed outside of send_message.

$cc is only used inside the send_message scope, so lets clean it out of the global scope. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Robin H. Johnson committed Apr 25, 2007 at 19:37 UTC af068d274245be9aedc58e6835c2e43329639974
1 file changed +3 -4
git-send-email.perl
+3 -4
@@ -379,7 +379,7 @@ if (@files) {
379 }
380
381 # Variables we set as part of the loop over files
382 -our ($message_id, $cc, %mail, $subject, $reply_to, $references, $message);
382 +our ($message_id, %mail, $subject, $reply_to, $references, $message);
383
384 sub extract_valid_address {
385 my $address = shift;
@@ -420,7 +420,6 @@ sub make_message_id
420
421
422
423 -$cc = "";
423 $time = time - scalar $#files;
424
425 sub unquote_rfc2047 {
@@ -443,7 +442,8 @@ sub send_message
442 $gitversion = Git::version();
443 }
444
446 - my ($author_name) = ($from =~ /^(.*?)\s+</);
445 + my $cc = join(", ", unique_email_list(@cc));
446 +my ($author_name) = ($from =~ /^(.*?)\s+</);
447 if ($author_name && $author_name =~ /\./ && $author_name !~ /^".*"$/) {
448 my ($name, $addr) = ($from =~ /^(.*?)(\s+<.*)/);
449 $from = "\"$name\"$addr";
@@ -591,7 +591,6 @@ foreach my $t (@files) {
591 $message = "From: $author_not_sender\n\n$message";
592 }
593
594 - $cc = join(", ", unique_email_list(@cc));
594
595 send_message();
596