Subject: [PATCH 4/9] Change the scope of the $cc variable as it is not needed outside of send_message.

From: "Robin H\. Johnson" <[email-masked]>
Date: Wed, 25 Apr 2007 19:37:18 -0700

From: Robin H. Johnson <[email-masked]>

$cc is only used inside the send_message scope, so lets clean it out of the global scope.

Signed-off-by: Robin H. Johnson <[email-masked]>
---
 git-send-email.perl |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index 8af235f..5210a40 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -379,7 +379,7 @@ if (@files) {
 }
 
 # Variables we set as part of the loop over files
-our ($message_id, $cc, %mail, $subject, $reply_to, $references, $message);
+our ($message_id, %mail, $subject, $reply_to, $references, $message);
 
 sub extract_valid_address {
 	my $address = shift;
@@ -420,7 +420,6 @@ sub make_message_id

-$cc = "";
 $time = time - scalar $#files;
 
 sub unquote_rfc2047 {
@@ -448,6 +447,7 @@ sub send_message
 		my ($name, $addr) = ($from =~ /^(.*?)(\s+<.*)/);
 		$from = "\"$name\"$addr";
 	}
+	my $cc = join(", ", unique_email_list(@cc));
 	my $ccline = "";
 	if ($cc ne '') {
 		$ccline = "\nCc: $cc";
@@ -594,7 +594,6 @@ foreach my $t (@files) {
 		$message = "From: $author_not_sender\n\n$message";
 	}
 
-	$cc = join(", ", unique_email_list(@cc));
 
 	send_message();
 
-- 
1.5.2.rc0.43.g2f4c7