aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-04-25 19:37:18 -0700
committerJunio C Hamano <junkio@cox.net>2007-04-25 21:03:03 -0700
commitaf068d274245be9aedc58e6835c2e43329639974 (patch)
tree3fa6039bc428291f74c363e3a802fc82bc238494
parent8e3d436b0b5148bac11259bac55621e285eeb6c4 (diff)
downloadgit-af068d274245be9aedc58e6835c2e43329639974.tar.gz
git-af068d274245be9aedc58e6835c2e43329639974.tar.xz
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>
-rwxr-xr-xgit-send-email.perl7
1 files changed, 3 insertions, 4 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 36795c8bd..ad83009e2 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 {
@@ -443,7 +442,8 @@ sub send_message
$gitversion = Git::version();
}
- my ($author_name) = ($from =~ /^(.*?)\s+</);
+ my $cc = join(", ", unique_email_list(@cc));
+my ($author_name) = ($from =~ /^(.*?)\s+</);
if ($author_name && $author_name =~ /\./ && $author_name !~ /^".*"$/) {
my ($name, $addr) = ($from =~ /^(.*?)(\s+<.*)/);
$from = "\"$name\"$addr";
@@ -591,7 +591,6 @@ foreach my $t (@files) {
$message = "From: $author_not_sender\n\n$message";
}
- $cc = join(", ", unique_email_list(@cc));
send_message();