summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-16 16:51:47 -0700
committerJunio C Hamano <junkio@cox.net>2007-04-16 16:51:47 -0700
commitf06a6a493a14ae632cdd3d04af04301769f4ef71 (patch)
tree98f235a13a28afbbb94359c6277781f41a8746d0 /git-send-email.perl
parentca135e7acc06f7d24ead732d2a1a531428da7135 (diff)
downloadgit-f06a6a493a14ae632cdd3d04af04301769f4ef71.tar.gz
send-email: do not leave an empty CC: line if no cc is present.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl7
1 files changed, 5 insertions, 2 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 1278fcba46..d6b15480dc 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -446,9 +446,12 @@ sub send_message
my ($name, $addr) = ($from =~ /^(.*?)(\s+<.*)/);
$from = "\"$name\"$addr";
}
+ my $ccline = "";
+ if ($cc ne '') {
+ $ccline = "\nCc: $cc";
+ }
my $header = "From: $from
-To: $to
-Cc: $cc
+To: $to${ccline}
Subject: $subject
Date: $date
Message-Id: $message_id